How to use jalali-moment - 3 common examples

To help you get started, we’ve selected a few jalali-moment examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aliyr / vue-persian-filters / src / filters / toPersianDate.js View on Github external
export default function toPersianDate (date, format) {
  return '‫‫' + toPersianNumber(moment(date).locale('fa').format(format))
}
github aliyr / vue-persian-filters / src / filters / toRelativeDate.js View on Github external
export default function toRelativeDate (date, format) {
  return '‫‫' + toPersianNumber(moment(date, format).locale('fa').fromNow())
}
github fingerpich / jalali-angular-datepicker / src / app / month-calendar / month-calendar.service.ts View on Github external
getConfig(config: IMonthCalendarConfig): IMonthCalendarConfig {
    this.DEFAULT_CONFIG = (config.calendarSystem !== ECalendarSystem.gregorian) ?
        this.JALALI_DEFAULT_CONFIG : this.GREGORIAN_DEFAULT_CONFIG;
    moment.locale(this.DEFAULT_CONFIG.locale);
    return {...this.DEFAULT_CONFIG, ...this.utilsService.clearUndefined(config)};
  }

jalali-moment

Manipulate and convert Jalali and Gregorian date easily

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular jalali-moment functions