Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
2.8 KiB
JavaScript
Executable File
31 lines
2.8 KiB
JavaScript
Executable File
"use strict";
|
|
|
|
/*
|
|
* Date and time utility functions for the RSpade framework.
|
|
* These functions handle date/time conversions and Unix timestamps.
|
|
*/
|
|
|
|
// ============================================================================
|
|
// DATE/TIME UTILITIES
|
|
// ============================================================================
|
|
|
|
/**
|
|
* Gets the current Unix timestamp (seconds since epoch)
|
|
* @returns {number} Current Unix timestamp in seconds
|
|
* @todo Calculate based on server time at page render
|
|
* @todo Move to a date library
|
|
*/
|
|
function unix_time() {
|
|
return Math.round(new Date().getTime() / 1000);
|
|
}
|
|
|
|
/**
|
|
* Converts a date string to Unix timestamp
|
|
* @param {string} str_date - Date string (Y-m-d H:i:s format)
|
|
* @returns {number} Unix timestamp in seconds
|
|
*/
|
|
function ymdhis_to_unix(str_date) {
|
|
const date = new Date(str_date);
|
|
return date.getTime() / 1000;
|
|
}
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ1bml4X3RpbWUiLCJNYXRo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