Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since we ported over Types from the Timex hex package, let's remove the unused types
- Loading branch information
Showing
8 changed files
with
23 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,5 @@ | ||
defmodule ESpec.DatesTimes.Types do | ||
|
||
# Date types | ||
@type year :: Calendar.year | ||
@type month :: Calendar.month | ||
@type day :: Calendar.day | ||
@type num_of_days :: 28..31 | ||
@type daynum :: 1..366 | ||
@type week_of_month :: 1..5 | ||
@type weekday :: 1..7 | ||
@type weeknum :: 1..53 | ||
# Time types | ||
@type hour :: Calendar.hour | ||
@type minute :: Calendar.minute | ||
@type second :: Calendar.second | ||
@type microsecond :: Calendar.microsecond | ||
@type timestamp :: {megaseconds, seconds, microseconds } | ||
@type megaseconds :: non_neg_integer | ||
@type seconds :: non_neg_integer | ||
@type microseconds :: non_neg_integer | ||
# Timezone types | ||
@type time_zone :: Calendar.time_zone | ||
@type zone_abbr :: Calendar.zone_abbr | ||
@type utc_offset :: Calendar.utc_offset | ||
@type std_offset :: Calendar.std_offset | ||
@type tz_offset :: -14..12 | ||
@type valid_timezone :: String.t | tz_offset | :utc | :local | ||
# Complex types | ||
@type weekday_name :: :monday | :tuesday | :wednesday | :thursday | :friday | :saturday | :sunday | ||
@type shift_units :: :milliseconds | :seconds | :minutes | :hours | :days | :weeks | :years | ||
@type time_units :: :microseconds | :milliseconds | :seconds | :minutes | :hours | :days | :weeks | :years | ||
@type time :: { hour, minute, second } | ||
@type microsecond_time :: { hour, minute, second, microsecond | microseconds} | ||
@type date :: { year, month, day } | ||
@type datetime :: { date, time } | ||
@type microsecond_datetime :: { date, microsecond_time } | ||
@type iso_triplet :: { year, weeknum, weekday } | ||
@type calendar_types :: Date.t | DateTime.t | NaiveDateTime.t | Time.t | ||
@type valid_datetime :: calendar_types | datetime | date | microsecond_datetime | ||
@type weekstart :: weekday | binary | atom | ||
end |