This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
studio/src/app/modals/editor/app-publish Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11import { Component , Element , Listen , State } from '@stencil/core' ;
2- import { User } from '../../../models/user' ;
2+
33import { take } from 'rxjs/operators' ;
4+
5+ import DateTimeFormatOptions = Intl . DateTimeFormatOptions ;
6+
7+ import { User } from '../../../models/user' ;
8+
49import { AuthService } from '../../../services/auth/auth.service' ;
510
611interface InputTargetEvent extends EventTarget {
@@ -26,10 +31,18 @@ export class AppPublish {
2631 @State ( )
2732 private user : User ;
2833
34+ @State ( )
35+ private today : string ;
36+
2937 constructor ( ) {
3038 this . authService = AuthService . getInstance ( ) ;
3139 }
3240
41+ async componentWillLoad ( ) {
42+ const options : DateTimeFormatOptions = { year : 'numeric' , month : 'short' , day : 'numeric' } ;
43+ this . today = new Intl . DateTimeFormat ( 'en-US' , options ) . format ( new Date ( ) ) ;
44+ }
45+
3346 async componentDidLoad ( ) {
3447 history . pushState ( { modal : true } , null ) ;
3548
@@ -115,7 +128,7 @@ export class AppPublish {
115128 </ p >
116129
117130 < p class = "author" padding >
118- < ion-label > { this . renderUser ( ) } | Mars 9 </ ion-label >
131+ < ion-label > { this . renderUser ( ) } | { this . today } </ ion-label >
119132 </ p >
120133 </ div >
121134 < div class = "preview" >
You can’t perform that action at this time.
0 commit comments