32 Replies Latest reply on Jul 17, 2008 10:26 PM by dongzky

    persian date

    dongzky Level 1
      Hi all,

      Since coldfusion doesn't support Farsi/Persian dates, I tried to use the icu4j lib and installed it as instructed. I tried to run the attached code(sample from a cf article) and as expected, it gave me an output in Farsi/Persian, literally. I mean, the characters and numbers were in Persian. The thing that I don't get is the Now(), as used in this code, which is supposed to give a Persian date (year 1387), it still gives me the gregorian date(year 2008). Although the characters are in persian, the date is still in gregorian. i want it to output in persian as in year 1387 which is the current year right now in Persian calendar. Same also with the month and day. Am I missing something here? Any insights are really much appreciated. Thanks.
        • 1. Re: persian date
          Daverms Level 3
          Hi,

          Have you installed that ICU4J.jar under <cf_root>\wwwroot\WEB-INF\lib directory?
          • 2. persian date
            tooMuchTrouble Level 3
            fairly certain i answered this before.

            there's no persian calendar in icu4j (or core java). you have to use dr. ghasem's lib. see:

            http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=719B5036-20ED-7DEE-2A B3B8F1EF7CF163

            use the testbed here:
            http://www.sustainablegis.com/projects/icu4j/calendarsTB.cfm
            • 3. Re: persian date
              dongzky Level 1
              @Paul: thanks. i'll be looking into this. So, to clear things, icu4j only supports farsi for displaying and not automatic date calculations according to the farsi locale, right?
              • 4. persian date
                dongzky Level 1
                hi Paul,

                I tried your testbed http://www.sustainablegis.com/projects/icu4j/calendarsTB.cfm and it gave me the output i was expecting. Persian year now is 1387. However, when I tried to download all the files for this testbed and ran it from my local PC, the year now in Persian is giving me 1386 instead of 1387? Anything more I have to configure?

                These are the things I did:
                1. I copy the persianCalendar.cfc and the rest of the cfc's to my cfc path.
                2. I copy the files(icu4j_3_2_calendar.jar, icu4j-4_0_d02-src.jar, icu4j-4_0_d02.jar, icu4j-charsets-4_0_d02.jar, icu4j-localespi-4_0_d02.jar and persiancalendar.jar) to \CF8root\WEB-INF\lib\addedClass where addedClass directory is my created dir which is already mapped or added in the java/jvm path in cf admin.
                3. I copy the calendarsTB.cfm to my cf apps directory.
                4. I restarted CF8 server.
                5. I tested calendarsTB.cfm and got year 1386 in persian instead of 1387
                • 5. Re: persian date
                  Level 7
                  dongzky wrote:
                  > @Paul: thanks. i'll be looking into this. So, to clear things, icu4j only
                  > supports farsi for displaying and not automatic date calculations according
                  > to the farsi locale, right?

                  you need a calendar to do date math, etc. icu4j doesn't have the jalali calendar
                  built in (if i recall correctly some kind of academic politics or the regular
                  old kind of politics prevented any kind of official persian calendar from being
                  included in icu4j but it does have a lot of others like coptic, arabic, chinese,
                  etc).
                  • 6. Re: persian date
                    Level 7
                    dongzky wrote:
                    > http://www.sustainablegis.com/projects/icu4j/calendarsTB.cfm and it gave me the
                    > output i was expecting. Persian year now is 1387. However, when I tried to
                    > download all the files for this testbed and ran it from my local PC, the year
                    > now in Persian is giving me 1386 instead of 1387? Anything more I have to

                    what date did you pass in? there's no one-to-one year correspondence between the
                    gregorian & persian calendars:

                    AP 1386 covers 2007-2008 AD
                    AP 1387 covers 2008-2009 AD
                    • 7. Re: persian date
                      dongzky Level 1
                      Hi Paul,

                      I was actually just using your files. The date passed is now(). When i tried to compare the one in your site and the one i ran here in my PC, it's quite different. Although, the one in my PC outputs the correct date, the calculation at the lower table is different. The screenshots are shown in the links below.

                      From your given site

                      From my local PC
                      • 8. persian date
                        dongzky Level 1
                        Hi Paul,

                        everything works fine now. My bad. I was using the old files (which makes me wonder if the old files were correct? or maybe i have messed up those files). Anyway, I tried the latest files which i downloaded from the links you gave and everything is ok. Thank you so much.
                        • 9. persian date
                          dongzky Level 1
                          Hi Paul,

                          Your i18ncalendars is really a great help. There is another thing also I want to clarify about the i18ncalendars and the persiancalendar class. Correct me if I am wrong, but the date base(I mean the basis for date conversion) is the gregorian date right? Which means, whatever date I input, the cf app(or maybe this is done from the classes) will consider date inputs as gregorian and then convert it to the desired calendar format? What if I am entering a date input that is already a persian date, say I enter 1387-04-14(yyyy-mm-dd), is there any way that we can tell the classes(or maybe the i18ncalendars) that the input date is already a persian date(which means tell the app that the basis for date conversion is Persian) ? The thing is, when I enter 1387-04-14(a persian date), the app accepts it as a gregorian date and do some conversions. But I want to let the app know that the input date is already a Persian date. Any insights, ideas or suggestions on this? Thanks.


                          -Fran
                          • 10. Re: persian date
                            Level 7
                            dongzky wrote:
                            > I am wrong, but the date base(I mean the basis for date conversion) is the
                            > gregorian date right? Which means, whatever date I input, the cf app(or maybe

                            no, it's based on cf(java) datetime, which happens to be gregorian calendar
                            based (actually it's decimals days since 31-dec-1899 like exel & db2).

                            > let the app know that the input date is already a Persian date. Any insights,
                            > ideas or suggestions on this. Thanks.

                            store your dates as cf datetimes or better yet as java epoch offsets (you will
                            eventually run into timezone issues if you have to support clients in multiple TZ).

                            i don't have any time right now to rework the persian calendar CFC so add the
                            method below to the CFC, it converts jalali calendar datetimes to gregorian
                            calendar datetimes. just be aware that cf sees all datetimes as being in the
                            server's TZ.


                            <cffunction name="jalaliToGregorian" access="public" output="false"
                            returntype="date" hint="converts Jalali calendar date to gregorian calendar date">
                            <cfargument name="jalaliYear" type="Numeric" required="true" hint="jalali year">
                            <cfargument name="jalaliMonth" type="Numeric" required="true" hint="jalali month">
                            <cfargument name="jalaliDay" type="Numeric" required="true" hint="jalali day">
                            <cfargument name="hours" type="Numeric" required="false" default=0>
                            <cfargument name="minutes" type="Numeric" required="false" default=0>
                            <cfargument name="seconds" type="Numeric" required="false" default=0>
                            <cfset var gregorianDate="">
                            <cfset var pc=createObject("java","com.ghasemkiani.util.SimplePersianCalendar")>
                            <cfset
                            pc.setDateFields(javaCast("int",arguments.jalaliYear),javaCast("int",arguments.jalaliMont h),javaCast("int",arguments.jalaliDay))>
                            <cfset gregorianDate=pc.getTime()>
                            <cfset
                            gregorianDate=createDateTime(year(gregorianDate),month(gregorianDate),day(gregorianDate), arguments.hours,arguments.minutes,arguments.seconds)>
                            <cfreturn gregorianDate> <!--- returns datetime in server TZ --->
                            </cffunction>
                            • 11. Re: persian date
                              dongzky Level 1
                              Hi Paul,

                              Thank you so much for the help. I got it working now. So far, so good. Anyway, I won't be having problems with TZ 'coz I will be specifically doing this app in a Persian locale server. I am going to look more info also from Dr. Ghasem's lib to familiarize the class as well. Thanks.
                              • 12. Re: persian date
                                Level 7
                                dongzky wrote:
                                > I won't be having problems with TZ 'coz I will be specifically doing this app
                                > in a Persian locale server. I am going to look more info also from Dr. Ghasem's

                                locale has nothing to do w/TZ. it usually depends on where the client & server
                                are physically located. i live in bangkok, use ITC ("Indochina Time" UTC+7) tz
                                but my w/s is in en_US locale.
                                • 13. Re: persian date
                                  dongzky Level 1
                                  Hi Paul,

                                  The cffunction "jalaliToGregorian" you gave me returns a date which is added by a month. I mean if today is 2008-07-08(yyyy-mm-dd), it returned 2008-08-08. Then I came across some documentations on java that the month starts from zero. So I made a little change on your function. I am not sure if I am right(correct me if I'm wrong here) but what I did is subtract 1 from the passed month parameter as shown:

                                  from this:
                                  pc.setDateFields(javaCast("int",arguments.jalaliYear),javaCast("int",arguments.jalaliMonth ),javaCast("int",arguments.jalaliDay))>

                                  to this:
                                  pc.setDateFields(javaCast("int",arguments.jalaliYear),javaCast("int",arguments.jalaliMonth -1),javaCast("int",arguments.jalaliDay))>

                                  And then it gave me the expected result.
                                  • 14. Re: persian date
                                    Level 7
                                    dongzky wrote:
                                    > The cffunction "jalaliToGregorian" you gave me returns a date which is added
                                    > by a month. I mean if today is 2008-07-08(yyyy-mm-dd), it returned 2008-08-08.

                                    yeah probably right. i hesitated over that but i assumed the good doctor's
                                    method handled that (it's a jalali calendar date after all). good catch.
                                    • 15. Re: persian date
                                      dongzky Level 1
                                      It could be that the class/method is by default meant for java apps, that's why it never bothered to subtract 1. Coz, if it did, then when a java app passes 0(first month), it would become -1 and would throw an error. In cf, that wouldn't be the case though since month number starts from 1.

                                      I really appreciate the help. I'll be looking more also into this class and do some tests. And if I need help again, I'll be keeping this thread up again. :)
                                      Thanks.
                                      • 16. Re: persian date
                                        dongzky Level 1
                                        Hi Paul and to anyone else,

                                        I have been using the classes and your cfc to display and calculate persian dates within coldfusion. The next thing I did is retrieve persian dates from an Oracle db and display in the client side(cf page) without using the components and the classes.

                                        These are the things I did in cfqueries before querying the dates.

                                        1) alter session set nls_calendar='persian' <- in oracle, this is how to tell oracle that the current session for calendar is in Persian so that it will give me a persian date(which is automatically calculated by oracle)

                                        2) alter session set nls_date_format='yyyy-mm-dd' <-setting date format in oracle for current session

                                        After that, in the same file I tried to query the db using select statement. But when I output the date object from Oracle to a cf page, the date object display becomes gregorian. I'm pretty sure oracle gave me a persian date 'coz i tried doing it inside oracle itself. But when cf page tries to display it, it becomes gregorian. My question is, do I need to use again the i18ncalendars component together with the classes or is there any other easier way that I have to set in order to display the Persian date in cf? My guess would be use again the components. But maybe there is another way.
                                        • 17. Re: persian date
                                          dongzky Level 1
                                          Hi Paul,

                                          How do I use your cfc to return a persian date object? I mean in your testbed, when you show your column for the i18nDateAdd, it still return a gregorian date object right? How do you convert this to a persian date object and not a string?
                                          • 18. Re: persian date
                                            Level 7
                                            dongzky wrote:
                                            > How do I use your cfc to return a persian date object? I mean in your testbed,

                                            why? as i explained before you're better off storing gregorian datetime objects
                                            (or better yet epoch offsets which is the underlying value for all icu4j
                                            calendars & all my calendar CFCs).
                                            • 19. persian date
                                              dongzky Level 1
                                              quote:

                                              Originally posted by: Newsgroup User
                                              dongzky wrote:
                                              > How do I use your cfc to return a persian date object? I mean in your testbed,

                                              why? as i explained before you're better off storing gregorian datetime objects
                                              (or better yet epoch offsets which is the underlying value for all icu4j
                                              calendars & all my calendar CFCs).



                                              Oh, I see. Thanks.
                                              • 20. persian date
                                                dongzky Level 1
                                                Hi Paul,

                                                I have a question on the i18nDateTimeFormat regarding the time. I am testing on my PC using windows xp. I set the locale of my PC to Farsi/Persian through the regional settings. After that, I changed the time zone in my pc to use GMT +3:30 (Tehran), which is I believe the tz, if not used, is similar in Iran. Now looking again at i18nDateTimeFormat method, the argument accepts a date in UTC format, right? So if I have a now() function to pass, I have to use DateConvert("local2utc",now()) as my input date(Please correct me If I'm no longer on the right track here of using your cfc). Base on the cfc, the return is:

                                                return tDateFormatter.format(dateConvert("utc2local",arguments.thisDate));

                                                In the return above, the UTC time is converted to local time(in my PC) and gives the format based on its locale, which is Farsi.Persian in my case. The output string is shown below:
                                                ۸:۳۷:۵۳ (GMT+۰۰:۰۰)، ساعت سهشنبه ۲۵ تیر ۱۳۸۷

                                                (GMT+۰۰:۰۰) -> this part means (GMT+00:00), the standard UTC tz. I thought the time return is going to use my locale tz (GMT+3:30). Any way of displaying the actual local time in my PC(GMT+3:30)? Anything I did wrong? Hope I'm making sense. Thanks.
                                                • 21. Re: persian date
                                                  Level 7
                                                  dongzky wrote:
                                                  > I have a question on the i18nDateTimeFormat regarding the time. I am testing
                                                  > on my PC using windows xp. I set the locale of my PC to Farsi/Persian through

                                                  locale has nothing to do w/tz.

                                                  > looking again at i18nDateTimeFormat method, the argument accepts a date in UTC
                                                  > format, right? So if I have a now() function to pass, I have to use

                                                  yes. it's an attempt to workaround the fact that all datetimes are server tz
                                                  datetimes to cf.

                                                  > (GMT+??:??) -> this part means (GMT+00:00), the standard UTC tz. I thought
                                                  > the time return is going to use my locale tz (GMT+3:30). Any way of displaying
                                                  > the actual local time in my PC(GMT+3:30)? Hope I'm making sense. Thanks.

                                                  i'm not seeing that here:
                                                  en_US: Wednesday, Tir 26, 1387 6:54:04 AM Thailand Time
                                                  fa_IR: چهارشنبه ۲۶ تیر ۱۳۸۷، ساعت ۶:۵۶:۱۵ (وقت هندوچین)

                                                  i don't read farsi but the en_US datetime string is correct for our dev server's
                                                  tz. if the farsi string's not correct let me know (could be a bug in dr.
                                                  ghasem's lib).

                                                  sure you got the server tz correct?

                                                  or do you mean the client & server are different tz? and you want the datetime
                                                  string in the client's tz?
                                                  • 22. Re: persian date
                                                    dongzky Level 1
                                                    quote:

                                                    Originally posted by: Newsgroup User
                                                    i don't read farsi but the en_US datetime string is correct for our dev server's
                                                    tz. if the farsi string's not correct let me know (could be a bug in dr.
                                                    ghasem's lib).

                                                    sure you got the server tz correct?

                                                    or do you mean the client & server are different tz? and you want the datetime
                                                    string in the client's tz?



                                                    Hi Paul,

                                                    Thanks for the quick reply. To clarify things more, I am actually using my PC as my test server. Actually, I tested your testbed online and it returned your server TZ(I assume it was correct 'cause it was returning GMT-05:00, could be your server's tz). But when I tried to download your testbed files and test here in my PC locally(which is also my test server), I also found out that the server TZ returned is always GMT+00:00. I'm not sure why but could it be some settings I have not done with my PC? Like I said, I'm using WinXP and tried to change the locale in Regional Settings control panel and then changed the time zone. Is there something more I should do? Thanks again for your guidance on this area.
                                                    • 23. Re: persian date
                                                      Level 7
                                                      dongzky wrote:
                                                      > here in my PC locally(which is also my test server), I also found out that the
                                                      > server TZ returned is always GMT+00:00. I'm not sure why but could it be some

                                                      what does this snippet show?

                                                      <cfscript>
                                                      tz=createObject("java","java.util.TimeZone");
                                                      writeoutput(tz.getDefault().getDisplayName());
                                                      </cfscript>
                                                      • 24. persian date
                                                        dongzky Level 1
                                                        quote:

                                                        Originally posted by: Newsgroup User
                                                        dongzky wrote:
                                                        > here in my PC locally(which is also my test server), I also found out that the
                                                        > server TZ returned is always GMT+00:00. I'm not sure why but could it be some

                                                        what does this snippet show?

                                                        <cfscript>
                                                        tz=createObject("java","java.util.TimeZone");
                                                        writeoutput(tz.getDefault().getDisplayName());
                                                        </cfscript>



                                                        Hi Paul,

                                                        The core java code above outputs "Iran Standard Time". Does this mean the String format I get in i18nDateTimeFormat is incorrect?
                                                        • 25. Re: persian date
                                                          Level 7
                                                          dongzky wrote:
                                                          > it outputs "Iran Standard Time"

                                                          ok.

                                                          was the farsi date string correct (or did it get mojibake-d)?

                                                          • 26. Re: persian date
                                                            dongzky Level 1
                                                            quote:

                                                            Originally posted by: Newsgroup User
                                                            dongzky wrote:
                                                            > it outputs "Iran Standard Time"

                                                            ok.

                                                            was the farsi date string correct (or did it get mojibake-d)?



                                                            Yes, the farsi date string is correct. It's only the time that is giving me a a GMT +00:00.
                                                            • 27. persian date
                                                              dongzky Level 1
                                                              Hi Paul,

                                                              More info on what I did:
                                                              My server/PC is localozed to persian and also the timezone.

                                                              I created the ff. customized functions:

                                                              <!--- substitutes the Now() function in CF --->
                                                              <cffunction access="public" name="global_Now" output="No" returntype="date">
                                                              <cfscript>

                                                              var utcNow=DateConvert("local2utc",Now());

                                                              </cfscript>
                                                              <cfreturn utcNow>
                                                              </cffunction>

                                                              <!--- this will make a call to your i18nDateTImeFormat --->
                                                              <cffunction access="public" name="global_DateTimeFormat" output="no" returntype="string">
                                                              <cfargument name="thisDate" required="yes" type="date">
                                                              <cfargument name="thisDateFormat" default="LONG" required="No" type="string">
                                                              <cfargument name="thisTimeFormat" default="LONG" required="No" type="string">

                                                              <cfscript>

                                                              var lstStandardDateTimeFormats = "FULL,LONG,MEDIUM,SHORT";
                                                              var nDateFormat=1;
                                                              var nTimeFormat=1;

                                                              if(ListFindNoCase(lstStandardDateTimeFormats,arguments.thisDateFormat,","))
                                                              {
                                                              nDateFormat=ListFindNoCase(lstStandardDateTimeFormats,arguments.thisDateFormat,",")-1;
                                                              }
                                                              else
                                                              {
                                                              nDateFormat=1;
                                                              }
                                                              if(ListFindNoCase(lstStandardDateTimeFormats,arguments.thisTimeFormat,","))
                                                              {
                                                              nTimeFormat=ListFindNoCase(lstStandardDateTimeFormats,arguments.thisTimeFormat,",")-1;
                                                              }
                                                              else
                                                              {
                                                              nTimeFormat=1;
                                                              }

                                                              sDateTime=thisCalendar.i18nDateTimeFormat(thisDate=arguments.thisDate,thisLocale=theLocal e,thisDateFormat=nDateFormat,thisTimeFormat=nTimeFormat);

                                                              </cfscript>

                                                              <cfreturn sDateTime>
                                                              </cffunction>

                                                              --------------------------------------------------------------------------------------
                                                              This is the code that tries to display the persian datetime:

                                                              #global_DateTimeFormat(global_Now(),"FULL","FULL")#

                                                              The code above returns the GMT+00:00.


                                                              However, when i try to directly call your method like this one below:

                                                              <cfscript>

                                                              thisDate=DateConvert("local2UTC",now());
                                                              sDateTime=thisCalendar.i18nDateTimeFormat(thisDate=thisDate,thisLocale="fa_IR",thisDateFo rmat=0,thisTimeFormat=0);
                                                              </cfscript>
                                                              <cfoutput>
                                                              #sDateTime#
                                                              </cfoutput>

                                                              This gave me the correct output. Is there anything worng with creating my own functions that calls your methods in your cfc? The reason I'm doing this is I have an existing English application that is based on Gregorian dates that I need to convert to Persian. And in order to avoid more hassles on the changes, I want to retain the parameters passed the way CF does and only need to change the function names(e.g. DateFormat becomes global_DateFormat with parameters passed unchanged). Thanks.



                                                              • 28. Re: persian date
                                                                dongzky Level 1
                                                                Hi Paul,

                                                                I have fixed the problem. It is in my code. The problem was I tried to declare my thisCalendar object this way:

                                                                <cfparam name="theCalendar" default="#cfcLocation#gregorianCalendar">

                                                                <cfset theLocale = "fa_IR">
                                                                <cfset theCalendar = "#cfcLocation#persianCalendar">

                                                                <cfset init()>

                                                                <cffunction access="public" name="init" output="No">
                                                                <cfset variables.thisCalendar=CreateObject("component",theCalendar)>
                                                                </cffunction>
                                                                ----------------------------------------
                                                                I also tried another way:
                                                                No init() function and just simply this:

                                                                <cfset variables.thisCalendar=CreateObject("component",theCalendar)>

                                                                Base on those two ways of declaring above, the variables.thisCalendar doesn't seem to produce the correct output. I still don't understand why. So what I did is I remove the init() function or the direct cfset for the 2nd test, and just declare the object thisCalendar in each function I created. And it worked! But still confused why. I don't want to be declaring the object everytime I create a new function. But I guess I'll just have to stick with this workaround for now. Thanks again.

                                                                • 29. Re: persian date
                                                                  Level 7
                                                                  dongzky wrote:
                                                                  > Yes, the farsi date string is correct. It's only the time that is giving me a
                                                                  > a GMT +00:00.

                                                                  sorry i meant was the farsi datetime string i posted correct? as i said i can't
                                                                  reproduce what you're seeing here (the en_US locale produces the correct tz in
                                                                  the datetimestring returned from that method).
                                                                  • 30. Re: persian date
                                                                    dongzky Level 1
                                                                    quote:

                                                                    Originally posted by: Newsgroup User
                                                                    dongzky wrote:
                                                                    > Yes, the farsi date string is correct. It's only the time that is giving me a
                                                                    > a GMT +00:00.

                                                                    sorry i meant was the farsi datetime string i posted correct? as i said i can't
                                                                    reproduce what you're seeing here (the en_US locale produces the correct tz in
                                                                    the datetimestring returned from that method).



                                                                    Hi Paul, the testbed you posted online is displaying the date correctly in Persian. However, the time is different from the actual Persian time. Online shows GMT -05:00 while in actual, right now it should be GMT +03:30 plus 1 hr DST, so it's about GMT+04;30 in all. Anyway, I have solved my problem in my case which I have posted before this post.

                                                                    By the way, another thing I made a little change in your cfc is the i18nDayOfWeek. Today, Persian day(if i'm not mistaken), I think is already in it's 5th day of the week, but the method returned 4. So I was assuming that this could be another issue on the offset difference between java and cf. Java, correct me if I'm wrong, starts day of week from 0 while cf starts from 1. So I just added the return value of i18nDayOfWeek method by 1:
                                                                    <cfreturn tCalendar.get(tCalendar.DAY_OF_WEEK)+1>

                                                                    Any comments on this? Maybe I'm in the wrong way. Thanks.
                                                                    • 31. Re: persian date
                                                                      Level 7
                                                                      dongzky wrote:
                                                                      > Hi Paul, the testbed you posted online is displaying the date correctly in
                                                                      > Persian. However, the time is different from the actual Persian time. Online
                                                                      > shows GMT -05:00 while in actual, right now it should be GMT +03:30 plus 1 hr

                                                                      ok let me say this again, "all datetimes are server datetimes in cf". see this
                                                                      for more details:

                                                                      http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=77223B6A-20ED-7DEE-2A B7FBB1F37ABD77

                                                                      also let me repeat that "locales have nothing to do with timezones".

                                                                      if you have to work with different timezones you need to understand these points.

                                                                      > DST, so it's about GMT+04;30 in all. Anyway, I have solved my problem in my
                                                                      > case which I have posted before this post.

                                                                      that somehow didn't make it through to the news forums (unless you edited an
                                                                      existing post, that never shows up in the news forums via my news reader). if i
                                                                      get the chance i'll have a look via a browser.

                                                                      > correct me if I'm wrong, starts day of week from 0 while cf starts from 1. So I

                                                                      sorry no, core java days of week start at 1 not zero (yes it's confusing because
                                                                      of the months starting at zero). the day of week difference could be as a result
                                                                      of tz differences.

                                                                      > just added the return value of i18nDayOfWeek method by 1:
                                                                      > <cfreturn tCalendar.get(tCalendar.DAY_OF_WEEK)+1>

                                                                      no, that will return the wrong value.
                                                                      • 32. Re: persian date
                                                                        dongzky Level 1
                                                                        Hi Paul,

                                                                        Thanks for all the help. I think I'm getting it now.