Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One of my minor bug bears is why we humans have to enter time into input fields in such rigid formats when there's a straightforward algorithm to make such inputs far more natural.

GNU date supports very human-oriented date input, some examples:

  $ date --date "today"
  $ date --date "next sunday"
  $ date --date "now + 3 hours"
  $ date --date "3 months" # same as "now + 3 months"
  $ date --date "5 december 2020"
  $ date --date "oct 19 2007"
  $ date --date "08:00"
  $ date --date "8:00"
  $ date --date "0800"
  $ date --date "0800 UTC"


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: