DP_DateExtensions Update

I recently received a tweet from @denndk with a very reasonable question about my JavaScript date extensions, DP_DateExtensions:

@kiwidust Just used your DateExtension lib. I see that quarterhours and businessdays in the add method is not implemented. why in the docs?

To be fair I did implement the methods. I just implemented them terribly.

First off, the “quarterhours” (and “halfhours” as well) were mistakenly calculating quarter and half minutes, not hours. Simple fix for a really dumbass mistake. Unfortunately the second issue was even dumbassier.

You see I originally released the component – and kept releasing updates for it for over six years – with no actual code in the “businessdays” calculation for the add() method. It was just plain empty. Last February I got an email mentioning this and so I fixed it. Then, a scant two months later I published an older version of the component to GitHub that didn’t have it. A year later I get a tweet.

You should be able to recognize two things: 1) nobody uses this, and 2) I’m an idiot.

In any case the component has been corrected (again) and uploaded to GitHub.

Leave a Reply

DepressedPress.com © 2014 Frontier Theme