Giter Club home page Giter Club logo

flexible-js-formatting's People

Contributors

eccenux avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kosta-arnorsky

flexible-js-formatting's Issues

Fatal error with date formatting on Safari

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

Decimals working incorrect

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

"#" behaving like "0" in format (or ... pilot error?)

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

Patch for /trunk/dates/date-functions.js

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:

Incorect output value

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

Num lock not working in Chrome

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

parseOffset broken if offset isn't "Z"

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.