adius/vectual/4.0.0

NOTE: the latest version is 6.0.0

Renamed to ad-si/Vectual. That is where the repository lives now. It has not been published as a package under the new name.

Versions published as adius/vectual still install under that name. 3 versions of 7 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/ad-si/Vectual.

What we checked: The repo moved to github.com/ad-si/Vectual and tag 4.0.0 is there; its commit 0d3f2db59855 is from 2021-02-13 17:06 UTC, before the version was published (2021-02-13 17:07 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one (GitHub's zip no longer comes out byte for byte the same), so the contents were checked instead.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/adius/vectual/zipball/4.0.0/

TimeUtils.Core

Date core.

Info

monthToInt : Month -> Int

Return month as integer. Jan = 1 to Dec = 12.

intToMonth : Int -> Month

Return integer as month. Jan <= 1 Feb == 2 up to Dec > 11.

daysInMonth : Int -> Month -> Int

Return days in month for year month.

monthList : List Month

List of months in order from Jan to Dec.

daysInNextMonth : Posix -> Int

Return days in next calendar month.

daysInPrevMonth : Posix -> Int

Return days in next calendar month.

daysInMonthDate : Posix -> Int

Days in month for given date.

isLeapYear : Int -> Bool

Return True if Year is a leap year.

isLeapYearDate : Posix -> Bool

Return True if Year of Date is a leap year.

yearToDayLength : Int -> Int

Return number of days in a year.

isoDayOfWeek : Weekday -> Int

Return the Iso DayOfWeek Monday 1, to Sunday 7.

Utility

toFirstOfMonth : Posix -> Posix

Return date of first day of month.

firstOfNextMonthDate : Posix -> Posix

Return first of next month date.

lastOfMonthDate : Posix -> Posix

Return date of last day of month.

lastOfPrevMonthDate : Posix -> Posix

Return last of previous month date.

daysBackToStartOfWeek : Weekday -> Weekday -> Int

Return number of days back to start of week day.

First parameter Weekday - is current day of week. Second parameter Weekday - is start day of week.

Conversion

fromTime : Int -> Posix

Convenience fromTime as time ticks are Elm Ints in this library.

Iteration Utility

nextDay : Weekday -> Weekday

Return next day in calendar sequence.

prevDay : Weekday -> Weekday

Return previous day in calendar sequence.

nextMonth : Month -> Month

Return next month in calendar sequence.

prevMonth : Month -> Month

Return previous month in calendar sequence.

Date constants

epochDateStr : String

Epoch starting point for tick 0.

Date constants

Ticks in a millisecond. (this is 1 on Win 7 in Chrome)

Ticks in a second.

Ticks in a minute.

Ticks in an hour.

ticksADay : Int

Ticks in a day.

Ticks in a week.