App Constants
React Kit exports shared application constants for timezone, locale, date formats, and cookie timeout defaults. Import them from the main package when you need consistent formatting or system defaults across apps.
Import
import { SystemConfig } from '@js-smart/react-kit';
SystemConfig
Enum of global system settings:
| Name | Value | Description |
|---|---|---|
SYSTEM_TIME_ZONE | 'America/New_York' | Default IANA time zone. |
SYSTEM_LOCALE | 'en-US' | Default locale. |
SYSTEM_DATE_FORMAT | 'MM/dd/yyyy' | Default date format string. |
SYSTEM_DATE_TIME_FORMAT | 'MM/dd/yyyy hh:mm:ss a' | Default date-time format string. |
ISO_DATE_FORMAT | 'yyyy-MM-dd' | ISO-style date format string. |
SYSTEM_COOKIE_TIMEOUT_MILLI_SECONDS | 3600000 | Cookie/session timeout in milliseconds (1 hour). |
Usage
const timeZone = SystemConfig.SYSTEM_TIME_ZONE;
const dateFormat = SystemConfig.SYSTEM_DATE_FORMAT;
Related
For date formatting helpers built on these defaults, see Date Util.