Skip to content

Implement 'fromUnixTime' and probably something else #85

@chshersh

Description

@chshersh

We should have fromUnixTime :: Real a => a -> Timestamp function which converts to Timestamp from unix time (and probably can be used with time library in future).

We probably will have all these functions:

fromUnixTime
fromGregorianCalendar
fromJulianCalendar
fromJewishCalendar

So I propose to also have:

data Calendar = UnixTime | Gregorian | Julian | Jewish

newtype Timestamp (calendar :: Calendar) = ...

fromUnixTime :: Real a => a -> Timestamp 'UnixTime

Though, I'm not sure what the are differences between implementations of these functions (except types).

@int-index comment, please.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions