hanigamal / flexible-js-formatting Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/flexible-js-formatting
Automatically exported from code.google.com/p/flexible-js-formatting
What steps will reproduce the problem?
1. Include date-functions.js in your script
2. Run the following
var test = new Date();
test.dateFormat("j M Y");
What is the expected output? What do you see instead?
Formatting to run with no errors. Instead Safari conks out with the following
error:
TypeError: Result of expression 'Date.monthNames[this.getMonth()]' [undefined]
is not an object.
What version of the product are you using? On what operating system?
Safari 5.0.3
Mac OS X 10.6.5
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Jan 2011 at 4:22
What steps will reproduce the problem?
1.Set the mask to 0,###0
2.enter 123.1
3.you'll get 124
What is the expected output? What do you see instead?
123
What version of the product are you using? On what operating system?
Please provide any additional information below.
There is no "optional decimals". I believe decimals are working incorrect when
there is not fixed count of them
Original issue reported on code.google.com by [email protected]
on 11 Apr 2011 at 9:18
What steps will reproduce the problem?
1. run
alert((+new Date).dateFormat('T'));
in client with for e.g. CEST timezone
What is the expected output? What do you see instead?
Timezone abbreviation should be displayed (CEST) but
whole Date.toString() output is displayed.
Original issue reported on code.google.com by [email protected]
on 8 Jun 2011 at 1:06
Attachments:
What steps will reproduce the problem?
1. Value: 9876.0000000001
2. Format: #,#.###
3. Result: 9,876.000
What is the expected output? What do you see instead?
I had expected that the trailing zeros would be omitted in the output ("9,876")
because at that point they are not significant digits. However, documentation
is so sparse that I'm not sure if that is the expected output or if I'm just
misinterpreting this as an issue.
What I see instead is what I would expect using a format of "#,#.00". That is,
I see the same behavior from both formats.
What version of the product are you using? On what operating system?
Using the latest code drop from this site, on Firefox 3.6x and IE 6 over
Windows XP.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 1 Dec 2010 at 5:26
FIX: get the month names from the configured(possibly translated) lists
FIX: added some pattern modifiers so month names could be less strict
parsed(case-insensitive for example). Implemented modifiers:ignoreCase(so jan
would be equivalent to jAN), start(start with a certain date format, ignores
the rest), end, contains, resetDay(if no day was specified, its assumes to be
'1' instead of current day)
NEW: the function is created bu using new Function instead of eval(). We can
try and catch parse errors this way, and according to some tests its a little
faster than eval(http://jsperf.com/function-vs-constructor-vs-eval)
NEW: monthNames, dayNames can now be translated(it can parse from multiple
languages now). The first defined trnaslation is the one used by the date
formatter. Added translations for ["ro","en","ua","hu","bg","ru"]
Original issue reported on code.google.com by [email protected]
on 11 Mar 2011 at 8:06
Attachments:
What steps will reproduce the problem?
1. demo page http://www.xaprb.com/articles/number-formatting-demo.html
2. value 8.996
3. format #,0.00
4. result 8.10 witch is wrong, 9.00 is right
Original issue reported on code.google.com by [email protected]
on 2 Jul 2009 at 1:43
In date-functions.js and in Date.prototype.getWeekOfYear() there is a
document.write() that overwrites the entire document if the W format identifier
is used.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2012 at 12:12
changed the validator to correctly validate in a more stricter way the
"2010-31-32" date(it wont validate as a real date now)
Original issue reported on code.google.com by [email protected]
on 7 Feb 2011 at 1:16
Attachments:
What steps will reproduce the problem?
1. Num lock not working in Chrome
What version of the product are you using? On what operating system?
Windows 7
Original issue reported on code.google.com by [email protected]
on 21 Sep 2012 at 4:50
What steps will reproduce the problem?
1. call format with ISO string with offset ie "+700"
2. when parseOffset is invoked, parseInt expects to see str[0], str[1], etc
3. str isn't an array
What is the expected output? What do you see instead?
Expect parsed date, see NaN instead
What version of the product are you using? On what operating system?
sorry, unknown, got from code repository 7/14/2009 7:00pm PDT
tested in IE7 and IE8
Please provide any additional information below.
solution:
add the following line of code after "var seconds":
if (str == "Z") { return 0 ; } // UTC, no offset.
var seconds ;
//new code, split string into char array
str=str.split(""); //new code
//end new code
seconds = parseInt(str[0] + str[1] + str[2]) * 3600 ; // e.g., "+05" or
"-08"
Original issue reported on code.google.com by [email protected]
on 15 Jul 2009 at 3:53
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.