UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

6 lines (5 loc) 294 B
export const year = /^(?:\d{4}|[+-]\d{6})$/; export const month = /^(0[1-9]|1[0-2])$/; export const day = /^(0[1-9]|[12][0-9]|3[01])$/; // ISO 8601 calendar date (extended): YYYY-MM-DD or ±YYYYYY-MM-DD export const plainDate = /^(?:\d{4}|[+-]\d{6})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/;