How to sell a function??

Express the business side of your digital lives. Share your experiences and/or your comments regarding a business or organization.

No advertising.

Moderator: General Moderators

User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Interesting. But I don't see why anyone would spend money for it. Maybe it's just me. :wink:
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

But I don't see why anyone would spend money for it. Maybe it's just me.
You must have never worked with any non-trivial date calculations :)

Try writing a function that would calculate how many business days there are between any two arbitrary dates where 'business day' is defined as 'any day that is not Saturday nor Sunday'. No day-by-day iteration allowed. Pure math please. :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I'm failing to see why anyone would use this function over PHP's Calendar functions GregorianToJD() and JDToGregorian(). They encode a date into a 'datestamp'. Better than that, Julian Day format can handle fractional days, so you can have 2454145.25 .. and 6 hours later it's 2454145.5. It's a little confusing because .0 is midday, so .25 is 6pm, and .5 is midnight, and .75 is 6am the next day. Easily 'fixable' by simply subtracting .5 from your Julian Day number though.
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

lmao
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

nathanr wrote:lmao
Two things:

1. What's funny about that?

2. We don't like AOL speak here. Don't use it.
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

I'd start with Ebay :D
Post Reply