|
Don't panic...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Just throw in the towel
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
Well don't shout ... everybody will want a tag!
|
|
|
|
|
I think your answer didn't help them out.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Yes, this is a problem that I have complained about, a few times. Chris and crew are aware. So far you have to wait a few minutes and your post will show up. Just go with the flow, I guess.
|
|
|
|
|
Yeah, I'm not upset, actually though it was humorous. When I saw the moderation email I realized where my post went. I see it's there, and the novelty has worn off...
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
I want to commit a crime that may put me on death row.
- Months start at 0. January is 0. WTF. I realize this is probably because whatever sh*t for brains wrote Date was thinking, oh, month should be an index so month[0] == 'January". Idiot.
- Changes date even though I'm only providing a date, so the time defaults to 0 Zulu, which means that at the moment, today is yesterday somewhere in the world, so all my dates are back one day. Same UI later in the day shows the correct date.
Marc
|
|
|
|
|
My lady wrote the calendar herself because the java cal is elephanting
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
But today in some parts of the world is yesterday in some parts of the world.
And January definitely is nothing to me!
|
|
|
|
|
I cant understand how people are using javascript dates with node.js in production systems. I tried using node some time back and the issues with dates is what made me run from it like hell. Even specialized datetime handling libraries like Moment.js and Date.js are almost useless.
|
|
|
|
|
Happily I'm not using node. I'm just using the javascript Date object, and that only to fix the damn date handling. So now I have code like this:
function fixupDates(data, view) {
for (var i = 0; i < data.length; i++) {
var row = data[i]
for (var j = 0; j < view.fields.length; j++) {
var field = view.fields[j]
if (field.type == "date") {
var dateval = row[field.name]
if (dateval.length >= 10) {
var year = dateval.substring(0, 4)
var month = dateval.substring(5, 7)
var day = dateval.substring(8, 10)
row[field.name] = new Date(year, month - 1, day)
}
}
}
}
}
Which as to walk through every f*cking row of the dataset that I just AJAX loaded!
Thankfully, because I use the same library for loading grid data and because I have the view definition in the javascript, I've only needed to fix this once and it fixes all my grids where a data field is rendered (BTW, I'm using jqxGrid)
Marc
|
|
|
|
|
You know, you can extend/replace JavaScript objects - even Date...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Endorse your pain/angry.
The biggest fault is just the weird language and the pseudo-APIs behind it. That would be acceptable in a kids learning world, but we'll pay all this JavaScript spreading in the (near) future...and will be a boomerang!
.Net and C# forever...
|
|
|
|
|
So Marc, tell me, when's the last time you got laid?
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: So Marc, tell me, when's the last time you got laid?
Recently. No need to be more explicit, haha.
Marc
|
|
|
|
|
|
Hahaha. As serendipity has it, I just last night bought JavaScript: The Good Parts. I wonder what Crockford's going to make of The Date Thing.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
Not that I use it, but I thought arrays in VB were 1-based, and people hate it for that. Well, that and many other reasons. Are you advocating we should follow the VB model?
month[0] being January makes sense to me. That said, an enum defining month names starting at 1 also make sense to me.
I see no way of ever reconciliating these sort of idiosyncrasies, unfortunately.
|
|
|
|
|
That would be somewhat OK, if it were consistent, in which case the first day of the month would be day 0, and the first year of a century would be 0 + the century. But it is not consistent and, by convention, months and days are already numbers starting with 1. Why confuse things just because you are a programmer who likes to put the months in an array starting with a zero offset? In that case, that offset should be calculated and used internally, not by forcing everyone else to add 1 to the month everywhere it is used. I agree with the poster that some common standards were made by people exhibiting ID-10-T errors.
|
|
|
|
|
I hear you, but ultimately, a month number is not an array index. The dumb thing is using them as such...'cuz then, somebody at some point has no choice but to add or subtract 1 because we're dealing with different "currencies".
|
|
|
|
|
I agree. That is why I also agree with the original poster that a JavaScript month should not be starting with zero. I was just trying to say that, if one is being aggravatingly dumb, at least be consistent about it. I wonder just who it was who made the decision to make months start with zero, and what he is doing now. Is he sitting in an easy chair with his tea and crumpets, musing about his wonderful history, or is he hiding in a safehouse in fear from those of us who didn't like his work.
|
|
|
|
|
He's probably fixing broken VB code.
At least that's the punishment I'd come up with.
|
|
|
|
|
Wasn't Javascript born out of C/C++? Then, that is why lists and arrays begin at 0 and not 1.
|
|
|
|
|
Y...yes...?
I don't think I was questioning this.
|
|
|
|
|
The method is deprecated, but try mydate.getYear() sometime
TTFN - Kent
|
|
|
|