DateTimeMate

6 min read Original article ↗

Decimals requires convert units. Conversions use 1 year = 365.25 days; months are not a unit. The default breakdown uses 365-day years, so converted year counts may differ.

strftime specifiers reference
%Afull weekday name
%aabbreviated weekday name
%Bfull month name
%babbreviated month name
%C(year / 100) as decimal
%cnational representation of time and date
%Dequivalent to %m/%d/%y
%dday of month (01-31)
%eday of month (1-31, blank-padded)
%Fequivalent to %Y-%m-%d
%GISO 8601 week-based year with century
%gISO 8601 week-based year without century (00-99)
%Hhour, 24-hour (00-23)
%hsame as %b
%Ihour, 12-hour (01-12)
%jday of year (001-366)
%khour, 24-hour (0-23, blank-padded)
%lhour, 12-hour (1-12, blank-padded)
%Mminute (00-59)
%mmonth (01-12)
%nnewline
%pAM or PM
%Requivalent to %H:%M
%requivalent to %I:%M:%S %p
%Ssecond (00-60)
%sseconds since Unix epoch
%Tequivalent to %H:%M:%S
%ttab
%Uweek of year, Sunday first (00-53)
%uweekday, Monday=1 (1-7)
%Vweek of year, Monday first (01-53)
%vequivalent to %e-%b-%Y
%Wweek of year, Monday first (00-53)
%wweekday, Sunday=0 (0-6)
%Xnational representation of time
%xnational representation of date
%Yyear with century
%yyear without century (00-99)
%Ztime zone name
%ztime zone offset from UTC
%-suppress padding on next numeric specifier (e.g. %-d)
%#same as %-
%%literal %

Repeat and until are mutually exclusive. Until is capped at 2 years from now.

Duration notation: dates uppercase (Y M W D), times lowercase (h m s ms us ns)

Decimals requires convert units. Negative durations are not allowed as inputs; use Subtract. Conversions use 1 year = 365.25 days; months are not a unit.

Duration notation: dates uppercase (Y M W D), times lowercase (h m s ms us ns)

Decimals shows the smallest unit with N decimal places, rounded. Conversions use 1 year = 365.25 days; months are not a unit.

Brief notation: dates uppercase (Y W D), times lowercase (h m s), sub-seconds after dot (ms us ns)

strftime specifiers reference
%Afull weekday name
%aabbreviated weekday name
%Bfull month name
%babbreviated month name
%C(year / 100) as decimal
%cnational representation of time and date
%Dequivalent to %m/%d/%y
%dday of month (01-31)
%eday of month (1-31, blank-padded)
%Fequivalent to %Y-%m-%d
%GISO 8601 week-based year with century
%gISO 8601 week-based year without century (00-99)
%Hhour, 24-hour (00-23)
%hsame as %b
%Ihour, 12-hour (01-12)
%jday of year (001-366)
%khour, 24-hour (0-23, blank-padded)
%lhour, 12-hour (1-12, blank-padded)
%Mminute (00-59)
%mmonth (01-12)
%nnewline
%pAM or PM
%Requivalent to %H:%M
%requivalent to %I:%M:%S %p
%Ssecond (00-60)
%sseconds since Unix epoch
%Tequivalent to %H:%M:%S
%ttab
%Uweek of year, Sunday first (00-53)
%uweekday, Monday=1 (1-7)
%Vweek of year, Monday first (01-53)
%vequivalent to %e-%b-%Y
%Wweek of year, Monday first (00-53)
%wweekday, Sunday=0 (0-6)
%Xnational representation of time
%xnational representation of date
%Yyear with century
%yyear without century (00-99)
%Ztime zone name
%ztime zone offset from UTC
%-suppress padding on next numeric specifier (e.g. %-d)
%#same as %-
%%literal %

Include a time zone; a zone-less time is interpreted as server-local time.

Accepts an IANA zone name, an abbreviation, or a UTC offset in seconds (e.g., 19800 = UTC+05:30).

Include %Z or %z to keep the time zone in the output.

strftime specifiers reference
%Afull weekday name
%aabbreviated weekday name
%Bfull month name
%babbreviated month name
%C(year / 100) as decimal
%cnational representation of time and date
%Dequivalent to %m/%d/%y
%dday of month (01-31)
%eday of month (1-31, blank-padded)
%Fequivalent to %Y-%m-%d
%GISO 8601 week-based year with century
%gISO 8601 week-based year without century (00-99)
%Hhour, 24-hour (00-23)
%hsame as %b
%Ihour, 12-hour (01-12)
%jday of year (001-366)
%khour, 24-hour (0-23, blank-padded)
%lhour, 12-hour (1-12, blank-padded)
%Mminute (00-59)
%mmonth (01-12)
%nnewline
%pAM or PM
%Requivalent to %H:%M
%requivalent to %I:%M:%S %p
%Ssecond (00-60)
%sseconds since Unix epoch
%Tequivalent to %H:%M:%S
%ttab
%Uweek of year, Sunday first (00-53)
%uweekday, Monday=1 (1-7)
%Vweek of year, Monday first (01-53)
%vequivalent to %e-%b-%Y
%Wweek of year, Monday first (00-53)
%wweekday, Sunday=0 (0-6)
%Xnational representation of time
%xnational representation of date
%Yyear with century
%yyear without century (00-99)
%Ztime zone name
%ztime zone offset from UTC
%-suppress padding on next numeric specifier (e.g. %-d)
%#same as %-
%%literal %

time zone abbreviations reference
ACDTUTC+10:30Australian Central Daylight Time
ACSTUTC+09:30Australian Central Standard Time
ACWSTUTC+08:45Australian Central Western Standard Time
ADTUTC-03:00Atlantic Daylight Time
AEDTUTC+11:00Australian Eastern Daylight Time
AESTUTC+10:00Australian Eastern Standard Time
AFTUTC+04:30Afghanistan Time
AKDTUTC-08:00Alaska Daylight Time
AKSTUTC-09:00Alaska Standard Time
ARTUTC-03:00Argentina Time
ASTUTC-04:00Atlantic Standard Time [ambiguous; also: Arabia Standard Time (UTC+3)]
AWSTUTC+08:00Australian Western Standard Time
BRSTUTC-02:00Brasilia Summer Time
BRTUTC-03:00Brasilia Time
BSTUTC+01:00British Summer Time [ambiguous; also: Bangladesh Standard Time (UTC+6)]
CASTUTC+09:30Central Australia Standard Time (synonym for ACST)
CDTUTC-05:00Central Daylight Time (North America) [ambiguous; also: Cuba Daylight Time (UTC-4)]
CESTUTC+02:00Central European Summer Time
CETUTC+01:00Central European Time
CHASTUTC+12:45Chatham Standard Time
CNSTUTC+08:00China Standard Time
CSTUTC-06:00Central Standard Time (North America) [ambiguous; also: China Standard Time (UTC+8), Cuba Standard Time (UTC-5)]
EATUTC+03:00East Africa Time
EDTUTC-04:00Eastern Daylight Time
EESTUTC+03:00Eastern European Summer Time
EETUTC+02:00Eastern European Time
ESTUTC-05:00Eastern Standard Time (North America) [ambiguous; also: Australian Eastern Standard Time (UTC+10)]
GMTUTC+00:00Greenwich Mean Time
GSTUTC+04:00Gulf Standard Time [ambiguous; also: South Georgia Time (UTC-2)]
HADTUTC-09:00Hawaii-Aleutian Daylight Time
HASTUTC-10:00Hawaii-Aleutian Standard Time (same as HST)
HATUTC-02:30Newfoundland Daylight Time (same as NDT)
HKTUTC+08:00Hong Kong Time
HSTUTC-10:00Hawaii Standard Time
IRSTUTC+03:30Iran Standard Time
ISTUTC+05:30India Standard Time [ambiguous; also: Israel Standard Time (UTC+2), Irish Standard Time (UTC+1)]
JSTUTC+09:00Japan Standard Time
KSTUTC+09:00Korea Standard Time
LHDTUTC+11:00Lord Howe Daylight Time (unusual 30-minute DST advance)
MDTUTC-06:00Mountain Daylight Time
MSTUTC-07:00Mountain Standard Time
NDTUTC-02:30Newfoundland Daylight Time
NPTUTC+05:45Nepal Time
NSTUTC-03:30Newfoundland Standard Time
NZDTUTC+13:00New Zealand Daylight Time
NZSTUTC+12:00New Zealand Standard Time
PDTUTC-07:00Pacific Daylight Time
PHTUTC+08:00Philippine Time
PKTUTC+05:00Pakistan Standard Time
PSTUTC-08:00Pacific Standard Time [ambiguous; also: Philippine Standard Time (UTC+8)]
SGTUTC+08:00Singapore Time
SSTUTC-11:00Samoa Standard Time [ambiguous; also: Singapore Standard Time (UTC+8; use SGT)]
UTUTC+00:00Universal Time
UTCUTC+00:00Coordinated Universal Time
WESTUTC+01:00Western European Summer Time
WETUTC+00:00Western European Time