Posted on October 28, 2008 by ubk
Hello.
Some times we came around a problem where we needed to know the difference between 2 dates in javascript. Also, in some cases we need to validate a date against another date. In these cases we search in the internet for a suitable function which takes 2 dates as arguments and finally let us know [...]
Filed under: Basic Scripts, Scripts, javascript | Tagged: check date, date, date difference, getTime, javascript, parsing, setTime | Leave a Comment »
Posted on October 2, 2008 by ubk
Integer Parsing in JavaScript. Some utility methods and tips
First Question will be like: How do I convert strings to numbers in JavaScript?
Answer: To convert a string to a number, use the JavaScript function parseFloat (for conversion to a floating-point number) or parseInt (for conversion to an integer).
parseFloat syntax: parseFloat(’string’)
How it works:
The argument of [...]
Filed under: Basic Scripts, Scripts, javascript | Tagged: digit, integer, isdigit, isempty, isinteger, isNaN, javascript, number, parse, parse integer, parseInt, parsing, tryparse, undefined | Leave a Comment »