Maahacka: but “==” and.

Wertheimer: So i juts use getfullyear?

Vilca: GetYear gets years after the epoch

Clemente: GreenJello, i think its an implementation thing

Hopps: Xatenev, add one to it

Becknell: I mean, 2015-115 = 1900

Scipio: Its just cause im in germany

Waldner: And we write 09 instead of 9

Minich: It’s the month index, so 0 = january

Weatherly: I have to check if the month is only one number and adda zero

Griffies: If number 10 char, prepend 0

Rybinski: If currentMonth 10 { currentMonth = ‘0’ + currentMonth; }

Boensch: Var currentMonth=’0’+currentDate.getMonth+1.slice-2


Rydeen: I set my stats widget the same way as my chat widget but the chat widget’s the only one that works- the other displays code in the footer. Why?

Mate: GreenJello: object Mon Sep 14 2015 06:36:17 GMT-0400 EDT

Quear: Except that the date is 14/09/15

Gentleman: Oh lol i forgot the +1

Mate: Gentleman: string ’09’

Parado: Just made another way working

Averitte: Isn’t date formatting typically better handled by an external lib?

Leyendecker: But hacking it together to save many kb of scripts isn’t always a bad idea

Berta: Especially when you only have one input field. 😛

Smucker: Well isn’t dateformatting typically an output thing? not an input thing? 😛

Bascle: And something that can handle outputs well is usually nice

Stolzenburg: When mi inside an event and use e.preventDefault

Herek: How do i continue the action then?

Gentleman: Xatenev: resubmit. but why are you preventing default on a form submission

Mantini: Well im checking if a field has the correct value

Gentleman: Soo why prevent default if it has the correct value

Mayeski: Otherwise im opening up a modalbox which says some cool things

Macquarrie: I thought i have to prevent default to CHECK if it has the correct value

Gentleman: Only if it’s an async check

Goepfarth: Cause otherwise its alrdy loading the next page?

Gentleman: And if it is, why are you doing that

Gentleman: Let the next page show the error

Penniman: Btw another question, sorry

Stindt: If i have 16.02.2015 for example

Bonaventure: How would i convert that into a timestamp?

Hasgill: I already have a correct date object in JS

Kalinoski: Xatenev call valueOf on it

Grote: For some reason, i have to load my page twice for my js to run, any thoughts what might cause this? anyone ever run into this?

Ramoutar: Console.logd.valueOf;

Kalinoski: Just keep in mind that JS timestamps are in ms not s

Carlew: Using jquery — load the dom, etc

Soult: Kalinoski: is that the same as PHP?

Shry: Hello guys, I am a bit baffled by JavaScript’s comparison of arrays. Could you please explain why “” == “” is false?

Gentleman: Maahacka: not just guys here. it’s because on objects arrays are objects == and === both compare object identity, not object contents.

Kalinoski: Divide by 1000 to get a PHP timestamp

Gentleman: Maahacka: the only way two objects will ever be == or ===, is if they’re the *same* object.

Dornbrook: Why would it not evaluate the same expressions the same way?

Vanamburgh: This is my code:

Gentleman: Maahacka: it does. and it creates two distinct objects, with the same contents.

Gentleman: Maahacka: but “==” and “===” aren’t for comparing contents.