AchasoftFrameworks and Applications
21 Jul 2016

Calendar

One of Common UI projects module was Calendar. it may seem easy but writing a calendar is a hard work, especially if you want to support multiple calendar like Persian and Hijri. before writing the calendar i had to write 3 different Date types : (Georgian Date, Persian Date, Hijri Date).

  • Georgian Date a simpler version of javascript date (adding and subtracting values require extra work and month isĀ 0 indexed based so you have to remember to add or subtract in converting)
  • Persian Date or (Shamsi – based on SUN)
  • Hijri Date (Arabs Date-time – based on MOON)

Dates are easily convertible and chainableĀ  : new PersianDate(1365, 3, 23).addDays(100).toHijriDate().addYears(-100).toGeorgianDate().dayName

it supports :

  • Enable / Disable
  • Culture (Different calendars)
  • Formatting
  • Events

AngularJs • Components • IranHost • Javascript • Uncategorized Leave a comment

Leave a Reply