← Back to team overview

ubuntu-phone team mailing list archive

Re: Addition of Hijri Calender

 

Hi Juzer,

I’m cc’ing the ubuntu-phone and the ubuntu-touch-coreapps lists, as people
there might be able to help.

I’ve had a quick look at what the Hijri calendar is and how it relates to
the Gregorian calendar. It looks like conversions are far from
straightforward, with complex calculations (but I was able to find some
existing code snippets that do them, so there’s probably some code out
there that can be re-used).

I think the cleanest way of adding the Hijri calendar to the app is to add
a notion of calendar backends. A backend could be as simple as a standalone
JS file that would provide a set of well-known functions that the app would
use to build the UI and do the date calculations. In a way, dateExt.js
could already be considered the default (gregorian) backend, although we
might want to take advantage of this change to refactor it a bit to clean
up the interfaces.

HTH,

 Olivier


On Thu, Oct 24, 2013 at 8:11 AM, Juzer Dana <juzerdana@xxxxxxxxx> wrote:

> Hi i want to add Hijri Calender data in addition to Ubuntu-Calender App in
> dateExt.js ....but i am confused oh how to do it
> Hijri calender have 12 months and range of 29 days and 30 days with no
> leap year....any help will do..
>
> --
> Regards,
>
>     Juzer Dana
>