Converting from BS to AD dates in form

Hi,

I need to convert BS to AD dates in Nepal. I'm debating whether to do this
in the form on on the back end in R. There doesn't appear to be a straight
way to convert between the two calendar systems. Instead, it's recommended
to count the number of days between the BS date and AD date because the BS
system uses a lunar calendar. I've found a javascript example on github
https://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-Date/blob/master/src/com/fa/converter/DateConverter.javawhich
is based on a lookup table
https://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-Date/blob/master/src/com/fa/converter/Lookup.java
that tells the number of days per month. Right now I have three inputs in
BS format (YYYY as Integer, Month as select one and day as integer). The
date spinner keeps showing up in the AD calendar format. Does anyone have
experience with this or the calendar calculations this working in a form?

Thank you!
Craig

Hi

we have used this, I hope it helps.

Attached are the instance that we are using and second one is step that
needs to followed. you need to paste in xmls.

regards

aman

steps.txt (710 Bytes)

nepali date instance.txt (34.8 KB)

ยทยทยท On Tue, Aug 5, 2014 at 12:42 PM, Craig A. wrote:

Hi,

I need to convert BS to AD dates in Nepal. I'm debating whether to do this
in the form on on the back end in R. There doesn't appear to be a straight
way to convert between the two calendar systems. Instead, it's recommended
to count the number of days between the BS date and AD date because the BS
system uses a lunar calendar. I've found a javascript example on github
https://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-Date/blob/master/src/com/fa/converter/DateConverter.javawhich
is based on a lookup table
https://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-Date/blob/master/src/com/fa/converter/Lookup.java
that tells the number of days per month. Right now I have three inputs in
BS format (YYYY as Integer, Month as select one and day as integer). The
date spinner keeps showing up in the AD calendar format. Does anyone have
experience with this or the calendar calculations this working in a form?

Thank you!
Craig

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.