module DynFork::Globals::Date

Overview

Converting string Date and DateTime to object Time.

Extended Modules

Direct including types

Defined in:

dynfork/globals/date.cr

Instance Method Summary

Instance Method Detail

def date_parse(date : String) : Time #

Converting string Date to object Time.

NOTE Formats: dd-mm-yyyy | dd/mm/yyyy | dd.mm.yyyy | yyyy-mm-dd | yyyy/mm/dd | yyyy.mm.dd

WARNING Unsupported formats:
USA - M/D/YYYY
Kazakhstan, Latvia - YYYY.DD.MM
PRC - YYYY-M-D
Hong Kong, Taiwan - YYYY/M/D
Finland, Czech Republic - D.M.YYYY
Netherlands - D-M-YYYY
Brazil, Greece, Thailand - D/M/YYYY


[View source]
def datetime_parse(datetime : String) : Time #

Converting string DateTime to object Time.

NOTE Formats: dd-mm-yyyy hh:mm:ss | dd/mm/yyyy hh:mm:ss | dd.mm.yyyy hh:mm:ss | dd-mm-yyyyThh:mm:ss | dd/mm/yyyyThh:mm:ss | dd.mm.yyyyThh:mm:ss | yyyy-mm-dd hh:mm:ss | yyyy/mm/dd hh:mm:ss | yyyy.mm.dd hh:mm:ss | yyyy-mm-ddThh:mm:ss | yyyy/mm/ddThh:mm:ss | yyyy.mm.ddThh:mm:ss

WARNING Unsupported date formats:
USA - M/D/YYYY
Kazakhstan, Latvia - YYYY.DD.MM
PRC - YYYY-M-D
Hong Kong, Taiwan - YYYY/M/D
Finland, Czech Republic - D.M.YYYY
Netherlands - D-M-YYYY
Brazil, Greece, Thailand - D/M/YYYY


[View source]