Comment

Comment by manifoldgeo

How does something like `let y: Time = 1 year` work? Does it take into consideration the idea of leap years and leap seconds, counting a single year as 365.2422 days[0]? Or does it count as 365 days?

I got curious and installed the CLI tool[1] and found that it does indeed account for leap second / leap years:

>>> let jahr: Time = 1 year

>>> let tage: Time = jahr -> days

>>> tage

    = 365.243 day    [Time]
References:

0: https://museum.seiko.co.jp/en/knowledge/story_01/

1: https://numbat.dev/doc/cli-installation.html

parent manifoldgeo 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton