yannickl / YLMoment

Parsing, validating, manipulating, and formatting dates easily in Objective-C (API inspired by moment.js)

Home Page:http://yannickl.github.io/YLMoment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dd instead of DD?

brandonscript opened this issue · comments

Hey, just curious why you're not following the moment.js syntax for day of month? Moment.js is DD, whereas YLMoment is dd.

Hi @r3mus,

The NSDateFormatter uses the format patterns from the Unicode Technical Standard version tr35-31. The dd is for the day of the month whereas the DD is for the day of the year.

I know it could be confusing but I wanted to use the NSDateFormatter to be fully compatible with the core foundation.

Ahh, that's great - thanks for the clarification.