Documentation ¶
Index ¶
- func GetDateFromString(dateStr string) (*time.Time, error)
- func ParseDatePayload(year, month, day int32) (int32, int32, int32, error)
- func ParseDay(day int32) (int32, error)
- func ParseDayEndTime(year, month, day int32) (time.Time, error)
- func ParseDayStartTime(year, month, day int32) (*time.Time, error)
- func ParseMonth(month int32) (int32, error)
- func ParseMonthPayload(year, month int32) (int32, int32, error)
- func ParseYear(year int32) (int32, error)
- func TimeGreaterThanCurrentDay(year, month, day int32) error
- func TimeGreaterThanCurrentMonth(year, month int32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDateFromString ¶
GetDateFromString converts the dateStr in format 2020-01-12 to time.Time
func ParseDatePayload ¶
ParseDatePayload parses the date provided and fails if it's greater than current time
func ParseDayEndTime ¶
ParseDayEndTime parses the provided year, month and day into latest time of the day
func ParseDayStartTime ¶
ParseDayStartTime parses the provided year, month and day into the earliest time of the day.
func ParseMonth ¶
ParseMonth parses the month and fails if it's incorrect
func ParseMonthPayload ¶
ParseMonthPayload parses month payload and fails if month is greater than current time
func TimeGreaterThanCurrentDay ¶
TimeGreaterThanCurrentDay checks whether the provided time details is greater than current day
func TimeGreaterThanCurrentMonth ¶
TimeGreaterThanCurrentMonth checks whether the month is greater than current month
Types ¶
This section is empty.