Hi,
I've used standard date functions in the past, but need to create
something a little different, as I am working on an investment
calculator.
What I need to do is validate two dates, and check for a complete
years. And a complete year is from day 1 until the proceeding day the
following year. A couple of examples:
01/01/2000 ---> 31/12/2000 --> 1 Complete year (Year 1)
01/01/2001 ---> 31/12/2001 --> 1 Complete year (Year 2)
01/01/2002 ---> 01/07/2002 --> 1 incomplete year (Year 3)
another example
31/01/2000 ---> 30/01/2001 ---> 1 Complete Year (Year 1)
I can probably manage to calculate the number of complete and
incomplete years, but how do I work out '1 Complete Year' from PHP's
internal functions ?
P.S. This may not be logical, but it is for a calculation devised by
the UK Inland Revenue .....
Thanks in advance for any suggestions...
Rgds
SS.
I've used standard date functions in the past, but need to create
something a little different, as I am working on an investment
calculator.
What I need to do is validate two dates, and check for a complete
years. And a complete year is from day 1 until the proceeding day the
following year. A couple of examples:
01/01/2000 ---> 31/12/2000 --> 1 Complete year (Year 1)
01/01/2001 ---> 31/12/2001 --> 1 Complete year (Year 2)
01/01/2002 ---> 01/07/2002 --> 1 incomplete year (Year 3)
another example
31/01/2000 ---> 30/01/2001 ---> 1 Complete Year (Year 1)
I can probably manage to calculate the number of complete and
incomplete years, but how do I work out '1 Complete Year' from PHP's
internal functions ?
P.S. This may not be logical, but it is for a calculation devised by
the UK Inland Revenue .....
Thanks in advance for any suggestions...
Rgds
SS.
Comment