fingerpich / jalali-moment

Display, parse, manipulate, validate and convert jalali (Persian, Khorshidi, Shamsi) or Gregorian (Miladi) dates and times.
https://fingerpich.github.io/jalali-moment/
MIT License
434 stars 68 forks source link

How can i have persian month and day of the week name ? #102

Closed amirzenoozi closed 4 years ago

amirzenoozi commented 4 years ago

I use this Library for my jalali datePicker form field but when i update this library from v3.3.3 to v3.3.8 i can't show the Month Name in persian but in the older version we can, what should i do ?

export class TimePipe implements PipeTransform {

  /**
   * Convert Date to Developer Date Format
   * @param value : get timestamp format
   * @param args : get locale and format
   */
  transform(value: any, args?: DatePipeArgs): any {
    if ( !value ) {
      return '';
    } else {
      const MomentDate = jMoment.from(value, 'fa');
      return MomentDate.format('jYYYY/jMMM/jDD');
    }
  }

}
<p>{{ '1399/05/01' | time: { format: ''jYYYY/jMMM/jDD', type: DateLocal } }}</p>

this Angular9.x Pipe will return this :

<p>1399/Amo/01</p>
fingerpich commented 4 years ago

Please create a demo as you see in the demo its working

amirzenoozi commented 4 years ago

Tnx I found a problem.