presetting the year

I have a bit of a problem. I use some code to send command lines to apple to get our sales reports for the previous month. To do this, I have to send the year, country codes, and the fiscal period.

Apple’s calendar runs from October (period 1) to September (period 12). The bug doesn’t show up til I have to get December’s reports because we don’t get them until around the middle of January (usually around the 12th or 13th).

I’m trying to figure out a way to revert the year without having to evaluate the current year so I don’t have to change it every year (mostly because i’ll have forgotten out it), and because I need it for some other code bits that I have to change on our sales page.

Richei, Did you solve this one yet?

Are you saying you want to go back a year if it is Dec. and you have to wait till Jan 12th so you would get last years report? Perhaps I do not understand the question. (Not an odd thing for me, LOL)

Let us know if you solved it Thanks, Ernie

yea, I got it fixed. instead of evaluating the year I looked at the period number. if it’s 01, I change the year back by 1. I’ll post the code when I get home.

Oh, I was just wondering if you needed help with it still.

No need to post the code. Doubt anyone needs to access Apple’s reporting system.
(Unless you think they might. ) At least the solution is here if someone searches for it.
Thanks…

I will mark it solved… Have a good one…

the solution might help someone looking for strtotime help.

Sounds good. Will leave it not solved for now… Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service