Science & Data

Date & time

Hissab can parse dates, times, durations, timezones, and Unix epoch/timestamp values.

Date formats

Written-out months are the safest.

FormatPatternExample
Day month yeardd mmm yyyy7 aug 2020
Month day yearmmm dd yyyyaug 7 2020
Year month dayyyyy mmm dd2020 aug 7

Numeric dot-separated dates parse too. When the first field could be a month, Hissab treats it as the month.

InputMeans
08.07.2020August 7, 2020
07.08.2020July 8, 2020
2020.08.07August 7, 2020
25.08.2020August 25, 2020 (25 cannot be a month)
7 aug 2020
aug 7 2020
2020 aug 7
2020.08.07

Time formats

FormatPatternExample
Hour:min:sec
hh:mm:ss:ms3:30:15:500
12-hour clockhh:mm am/pm3:30 pm
24-hour clockhh:mm13:30
Date with time2020.08.07 3:30 pm
Time with timezone3:30 pm pst
2020.08.07 3:30 pm
3:42 am pst in beijing

Operations

2020.08.07 + 5 days
2020.08.07 - 5 days
2020.08.07 - 9 sep 2020 to minutes
today - 1 feb 1990 to years
12 mar 2020 utc to epoch
12 mar 2020 utc to timestamp
1646480610 seconds to human date
now in beijing

Keywords

KeywordMeaning
nowcurrent date and time
todaycurrent date
tomorrowtomorrow's date
yesterdayyesterday's date

Duration and rate units

secondly, minutely, hourly, daily, weekly, monthly, quarterly, and yearly convert like a unit family.

250 weekly to yearly
0.21 hourly to monthly

Common mistakes

  • 2020-08-07 and 08/07/2020 are arithmetic, not dates. Use 2020.08.07 or 7 aug 2020.
  • 3:30 pm 2020.08.07 is invalid — the time must come after the date.
  • 1646480610 to human date treats the bare number as milliseconds. Use 1646480610 seconds to human date.
2020.08.07
1646480610 seconds to human date