captbaritone / captbaritone/datejs

toShortDateString() fr-CH

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. date-fr-CH.js

2.
var datejs = new Date(2010,10,30);
alert(datejs.toShortDateString());

alert(Date.CultureInfo.name);
alert(Date.CultureInfo.formatPatterns.shortDatePattern);

What is the expected output? What do you see instead?
expected:
30.11.2010
fr-CH
dd.MM.yyyy

real output:
Mon Feb 28 00:00:00 UTC+0100 2011
fr-CH
undefined

What version of the product are you using? On what operating system?
product:
/**
* Version: 1.0 Alpha-1
* Build Date: 13-Nov-2007

Windows 7

Please provide any additional information below.

a) In date-fr-CH.js we define the Date.CultureInfo.formatPatterns as:
formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",
etc.

b) when we use them, for example in toShortDateString we use the wrong names
for the patterns:
Date.prototype.toShortDateString=function(){return
this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);}

```

Original issue reported on code.google.com by `sgorbini...@gmail.com` on 17 Jan 2011 at 10:24

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.