+
Skip to content

i18n: format date #29

@rachel-carvalho

Description

@rachel-carvalho

First I just want to say that this is a great lib, gets the job done and has great i18n support.

Anyway, I'm dealing with a website that has to show dates both in english and in portuguese (great to see that pt was already implemented!). It was all good, until I found this place where I need to write a full date in both languages.

I realized I would need 2 different formats: one for english (MMMM D, YYYY - October 20, 2011) and one for portuguese (D \de MMMM \de YYYY - 20 de Outubro de 2011 [and just now I see that I don't know if it's possible to escape the lowercase d, but anyway, focus]).

Is there a way to call moment().format() with no parameters so that it assumes a default formatting for the whole date?

If there isn't, it would be nice to implement it, I could give it a go.

Maybe a new token that contains the whole date and whole time, like moment().format('T'); // 2:17 PM in english and 14:17 in portuguese. Though I have no idea what a good token would be for the whole date...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载