|
Re: BirtDuration.day [message #547370 is a reply to message #547290] |
Fri, 16 July 2010 13:38 |
|
I don't think you want to mess around with a lexicalDuration anyway. All you want is to take an amount and a month and compute a daily average. You can do that with a fairly straightforward javascript.
There are some libraries out there which provide a "daysInMonth" function - that would simplify your life but I don't think we have it available to us.
I'll leave the specific syntax of some of the functions to you as I'm not in my environment.
Given as available fields [amount] and [date]
If [date].Month in [9,4,6,11] then [amount] / 30.0;
If [date].Month in [1, 3, 5, 7, 8, 10, 12] then [amount] / 31.0;
If [date].Month = 2 and [date].Year mod 4 = 0 then [amount] / 29.0;
If [date].Month = 2 and [date].Year mod 4 != 0 then [amount] / 28.0;
|
|
|
Powered by
FUDForum. Page generated in 0.03294 seconds