melvitax/DateHelper

style: month/shortMonth/veryShotMonth return wrong result

dean-nxa opened this issue · 0 comments

code:

        var date = Date(fromString: "2009-08-11T06:00:00.000-07:00", format: .isoDateTimeFull)
        print(date)
        print("----------------------------------------------")
        print(date?.toString(format: .isoYearMonth))
        print("----------------------------------------------")
        print(date?.toString(style: .month))
        print(date?.toString(style: .shortMonth))
        print(date?.toString(style: .veryShortMonth))

output:

Optional(2009-08-11 13:00:00 +0000)
----------------------------------------------
Optional("2009-08")
----------------------------------------------
Optional("March")
Optional("Mar")
Optional("M")