tristandunn-calendar_date_select 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/History.txt +240 -0
- data/MIT-LICENSE +20 -0
- data/Manifest.txt +42 -0
- data/README.txt +18 -0
- data/Rakefile +35 -0
- data/VERSION +1 -0
- data/calendar_date_select.gemspec +96 -0
- data/init.rb +1 -0
- data/js_test/functional/.tmp_cds_test.html +306 -0
- data/js_test/functional/cds_test.html +349 -0
- data/js_test/functional/format_iso_date_test.html +52 -0
- data/js_test/prototype.js +4184 -0
- data/js_test/test.css +40 -0
- data/js_test/unit/cds_helper_methods.html +46 -0
- data/js_test/unittest.js +564 -0
- data/lib/calendar_date_select/calendar_date_select.rb +121 -0
- data/lib/calendar_date_select/form_helpers.rb +229 -0
- data/lib/calendar_date_select/includes_helper.rb +29 -0
- data/lib/calendar_date_select.rb +33 -0
- data/public/blank_iframe.html +2 -0
- data/public/images/calendar_date_select/calendar.gif +0 -0
- data/public/javascripts/calendar_date_select/calendar_date_select.js +443 -0
- data/public/javascripts/calendar_date_select/format_american.js +35 -0
- data/public/javascripts/calendar_date_select/format_danish.js +31 -0
- data/public/javascripts/calendar_date_select/format_db.js +27 -0
- data/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
- data/public/javascripts/calendar_date_select/format_finnish.js +32 -0
- data/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
- data/public/javascripts/calendar_date_select/format_iso_date.js +29 -0
- data/public/javascripts/calendar_date_select/format_italian.js +24 -0
- data/public/javascripts/calendar_date_select/locale/ar.js +10 -0
- data/public/javascripts/calendar_date_select/locale/da.js +11 -0
- data/public/javascripts/calendar_date_select/locale/de.js +11 -0
- data/public/javascripts/calendar_date_select/locale/es.js +11 -0
- data/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/public/javascripts/calendar_date_select/locale/fr.js +11 -0
- data/public/javascripts/calendar_date_select/locale/it.js +9 -0
- data/public/javascripts/calendar_date_select/locale/nl.js +11 -0
- data/public/javascripts/calendar_date_select/locale/pl.js +11 -0
- data/public/javascripts/calendar_date_select/locale/pt.js +11 -0
- data/public/javascripts/calendar_date_select/locale/ru.js +10 -0
- data/public/javascripts/calendar_date_select/locale/sl.js +11 -0
- data/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/public/stylesheets/calendar_date_select/default.css +135 -0
- data/public/stylesheets/calendar_date_select/green.css +142 -0
- data/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/public/stylesheets/calendar_date_select/red.css +135 -0
- data/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
- data/spec/calendar_date_select/form_helpers_spec.rb +203 -0
- data/spec/calendar_date_select/includes_helper_spec.rb +46 -0
- data/spec/spec_helper.rb +26 -0
- metadata +113 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>Format ISO Date Test Cases</title>
|
7
|
+
<script src="../prototype.js" type="text/javascript"></script>
|
8
|
+
<script src="../unittest.js" type="text/javascript"></script>
|
9
|
+
<!-- other JavaScript includes -->
|
10
|
+
<script src="../../public/javascripts/calendar_date_select/calendar_date_select.js" type="text/javascript"></script>
|
11
|
+
<script src="../../public/javascripts/calendar_date_select/format_iso_date.js" type="text/javascript"></script>
|
12
|
+
<link rel="stylesheet" href="../test.css" type="text/css" />
|
13
|
+
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
|
17
|
+
<!-- Log output -->
|
18
|
+
<div id="testlog"> </div>
|
19
|
+
|
20
|
+
<!-- here go any elements you do the testing on -->
|
21
|
+
<div id="cds_test_div">
|
22
|
+
<input type="text" id="cds_test" />
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<!-- Tests -->
|
26
|
+
<script type="text/javascript" language="javascript">
|
27
|
+
// <![CDATA[
|
28
|
+
new Test.Unit.Runner({
|
29
|
+
setup: function() { with(this){
|
30
|
+
}},
|
31
|
+
teardown: function() { with(this){
|
32
|
+
}},
|
33
|
+
testParsing_withTime: function() { with(this) {
|
34
|
+
time = Date.parseFormattedString("2009-01-05 12:30")
|
35
|
+
assertEqual(2009, time.getFullYear());
|
36
|
+
assertEqual(0, time.getMonth());
|
37
|
+
assertEqual(5, time.getDate());
|
38
|
+
assertEqual(12, time.getHours());
|
39
|
+
assertEqual(30, time.getMinutes());
|
40
|
+
}},
|
41
|
+
testParsing_withoutTime: function() { with(this) {
|
42
|
+
time = Date.parseFormattedString("2009-01-05")
|
43
|
+
assertEqual(2009, time.getFullYear());
|
44
|
+
assertEqual(0, time.getMonth());
|
45
|
+
assertEqual(5, time.getDate());
|
46
|
+
}}
|
47
|
+
|
48
|
+
});
|
49
|
+
// ]]>
|
50
|
+
</script>
|
51
|
+
</body>
|
52
|
+
</html>
|