Show today's date on Ionic

HI everybody,

I have a question about a component.
I am french and I am doing a weather app (to learn Ionic, I am a newbie ahah)
I want to display today’s date with HTML and I don’t know how to do.

Please can you help me ? All the subject about the time are about inputs and Ion-Datetime but this is not what I am looking for.

Thank you :slight_smile: :slight_smile: :slight_smile:

1 Like

This came up often enough for me that I wrote a set of date pipes. You’re welcome to use them, or to write your own after looking at them.


1 Like

In your TS file:

 export class yourComponent {
  today =;

in your html:

<p>{{today | date}}</p>

This will give you current date out of box.

Check bottom of this page:


I use to get the date:

myDate: new Date().getTime()

and in HTML you can “choose” che format for your date…for example

{{myDate | date: 'dd/MM/yyyy'}}

will give you “24/05/18”



I found what I have been looking for. I give my answer here, thanks to everybody.

My TS File :

now = new Date();

My HTML File :

{{now | date:'EEEE dd MMMM yyyy':'+0200':'fr'}}

That gives me (in french) : lundi 24 mai 2018

Thanks for all your answers :slight_smile: