dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10567
Re: FiscalYear Period type?
Thanks
Kenya financial year
- FY 2010/11 - runs from July 1st 2010 through June 30th 2011.
- Y 2011/12 -runs from July 1st 2011 through June 30th 2012.
- Y 2012/13 - runs from July 1st 2012 through June 30th 2013.
Regards
On Wed, Feb 23, 2011 at 9:11 AM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:
> Hi there. I was wondering if it would be possible to implement the fiscal
> year period type? This meay have come up before, but it seems we may need it
> soon.
>
>
> - FY 2010 runs from October 1st 2009 through September 30th 2010.
> - FY 2011 is from October 1st 2010 through September 30th 2011.
> - FY 2012 is from October 1st 2011 through September 30th 2012.
>
>
>
> I think it would look something like this..perhaps..
>
> private Period createPeriod( Calendar cal )
> {
> cal.set( Calendar.YEAR, cal.get( Calendar.YEAR ) + cal.get(
> Calendar.MONTH ) % 10 );
> cal.set( Calendar.MONTH, Calendar.OCTOBER );
> cal.set( Calendar.DATE, 1 );
>
> Date startDate = cal.getTime();
>
> cal.add( Calendar.YEAR, 1 );
> cal.set( Calendar.DAY_OF_YEAR, cal.get( Calendar.DAY_OF_YEAR ) - 1
> );
>
> return new Period( this, startDate, cal.getTime() );
> }
>
> What I am not sure about is all the rest of the methods which need to be in
> the API, as well as the aggregation engine. Data will be entered in our case
> quarterly, but needs to be aggregated to fiscal years.
>
> Regards.
> Jason
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+260974901293
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
--
Samuel Cheburet
Ministry Of Health
P.O. Box 20781
Nairobi, Kenya
Mobile- 0721624338
Follow ups
References