View Single Post
 
Old 01-25-2014, 03:33 AM
Scrapyard Scrapyard is offline Windows Vista Office 2007
Novice
 
Join Date: Jan 2014
Posts: 2
Scrapyard is on a distinguished road
Default

Interesting...
I always find strange ways of doing things. I determined leap year using the following method (items are bookmarked):

UserYear = 2016 (or any year the user inputs)
Leap1 = 1/29/UserYear
Leap2 = { If {Leap1 \@ MMMM } = "February" 1 0 }

So, maybe something like the following should work?
{ IF {=G8 } >= 31 { IF { { =G8 } =28 }*{ { =Leap2 } = 1} 29 "" } {IF { =G8 } ≠ 0 { =G8+1 } "" }}

Or maybe?
{ IF {({ =G8})*({ =Leap2})} =28 29 "" }
For some reason, I can't seem to get this to work. It always produces a 29 result; it appears as though =28 is an answer rather than a qualifier.

"≠" because I couldn't use greater/less than symbols in forum.

That said, I'll look at what you've provided. I can see that it does the most comprehensive check. I'm just not confident in my ability to incorporate it properly.
Thanks!

Last edited by Scrapyard; 01-25-2014 at 04:50 AM. Reason: Another Attempt
Reply With Quote