Answers for "angular current date time"

1

angular get current time

import { Component } from '@angular/core';
@Component({
    selector: 'my-app',
    template: `{{ now }}`
})
export class AppComponent {
    public now: Date = new Date();

    constructor() {
        setInterval(() => {
          this.now = new Date();
        }, 1);
    }
}
Posted by: Guest on February-17-2021
8

pipe of date angular

content_copy
      
{{ dateObj | date }}               // output is 'Jun 15, 2015'
{{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'
{{ dateObj | date:'shortTime' }}   // output is '9:43 PM'
{{ dateObj | date:'mm:ss' }}       // output is '43:11'
Posted by: Guest on June-09-2020
0

angular date pipi locale

<p>French date time is {{todayDate | date:'full':'+0200':'fr'}}</p>

Result:
French date time is mercredi 19 juin 2019 à 13:25:15 GMT+02:00
Posted by: Guest on November-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language