Pergunta

I am using MomentJS to display a date.

moment(startDate).format('lll')

This will display: Jan 29 2014 03:04

But I would like to remove the year which is "2014" how can I do that?

Here is the link to the momentjs

MomentJS

Foi útil?

Solução

I haven't used that library before, but try this:

moment(StartDate, "MMM DD HH:mm");

At least this would work in .NET.

Outras dicas

What you want is:

moment(startdate).format('MMM DD h:mm A');

See a javascript example:

http://jsfiddle.net/remus/rLjQx/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top