PluginProbe
The Innovative Form Builder – IvyForms / 1.1
The Innovative Form Builder – IvyForms v1.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / constants / timeConstants.ts

timeConstants.ts in The Innovative Form Builder – IvyForms 1.1, at frontend/src/constants/timeConstants.ts

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Time format constants used across the application
3 * Centralized time-related constants for validation, formatting, and calculations
4 */
5 export const TIME_CONSTANTS = {
6 /** Minimum hour in 24-hour format (0 = midnight) */
7 MIN_HOUR_24: 0 as number,
8
9 /** Maximum hour in 24-hour format (23 = 11 PM) */
10 MAX_HOUR_24: 23 as number,
11
12 /** Minimum hour in 12-hour format (1 AM) */
13 MIN_HOUR_12: 1 as number,
14
15 /** Maximum hour in 12-hour format (12 PM/AM) */
16 MAX_HOUR_12: 12 as number,
17
18 /** Hour value for AM/PM conversion (12 noon/midnight) */
19 MERIDIEM_12_HOUR: 12 as number,
20
21 /** Minimum minute value (0) */
22 MIN_MINUTE: 0 as number,
23
24 /** Maximum minute value (59) */
25 MAX_MINUTE: 59 as number,
26
27 /** Number of hours in a day (24) */
28 MIN_HOURS_IN_DAY: 24 as number,
29
30 /** Number of minutes per hour (60) */
31 MINUTES_PER_HOUR: 60 as number,
32
33 /** Maximum time in minutes since midnight (23:59 = 1439 minutes) */
34 MAX_TIME_IN_MINUTES: (23 * 60 + 59) as number,
35 } as const
36
37 /**
38 * Type-safe access to TIME_CONSTANTS
39 */
40 export type TimeConstants = typeof TIME_CONSTANTS
41