adius/vectual/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).

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.