brick / date-time

Date and time library for PHP
MIT License
326 stars 30 forks source link

Does "epoch" mean UNIX epoch? #1

Closed marcospassos closed 6 years ago

marcospassos commented 6 years ago

I'd like to suggest specifying which epoch the library uses as the reference.

BenMorel commented 6 years ago

Yes it does, is the term epoch used for anything else?

marcospassos commented 6 years ago

Epoch is an instant in time chosen as the origin of a particular era. Technically, it ambiguous unless you specify the era and the underlying calendar system.

https://en.wikipedia.org/wiki/Epoch_(reference_date)

BenMorel commented 6 years ago

It is unambiguously documented in some places:

https://github.com/brick/date-time/blob/master/src/Instant.php#L17

But it does just say "epoch" in other places indeed. Feel free to open a PR if you wish!

BenMorel commented 6 years ago

Closing for now, please feel free to open a PR if you feel like 1970-01-01T00:00:00Z should be explicitly documented in some places.