Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by zX41ZdbW

2 days ago

Interesting how it compares with the ClickHouse implementation, which uses a lookup table: https://github.com/ClickHouse/ClickHouse/blob/master/src/Com...

So that a day number can be directly mapped to year, month, and day, and the calendar date can be mapped back with a year-month LUT.

1 comment

zX41ZdbW

Reply

simlevesque  2 days ago

Simply, ClickHouse only works on a 399 years span while OP's algorith parses any date, over 3 trillion years.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities