summaryrefslogtreecommitdiffstats
path: root/dist/index.html
blob: 02404baaefddb437722ee2b0e689501320c579be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
<!DOCTYPE html>
<html> 
	<head> 
		<meta charset="UTF-8" />

		<title>Intimidatetime - jQuery and Zepto datetime picker</title>
		<meta name="Description" content="The home page of Intimidatetime, the best datetime picker you'll ever meet" />
		<meta name="Keywords" content="jquery, zepto, date, time, picker" />

		
		<style type="text/css">
			body,img,p,h1,h2,h3,h4,h5,h6,form,table,td,ul,ol,li,dl,dt,dd,pre,blockquote,fieldset,label{
				margin:0;
				padding:0;
				border:0;
			}
			body{ background-color: #f8f7ec; border-top: solid 10px #777; font: 90% Helvetica, sans-serif; padding: 20px; }
			h1,h2,h3,h4{ margin: 10px 0; font-family: Plantin, "Plantin std", "Plantin", "Baskerville", Georgia, "Times New Roman", serif; font-weight: normal; }
			h1{font-size: 2.2em;margin: 0 0 20px 0; }
			h2{ background-color: #D95656; line-height: 18px; font-size: 18px; letter-spacing: 1px; padding: 5px 10px; margin: 10px 0 10px -60px; color: #fff; display: inline-block; border-radius: 4px; -moz-border-radius: 4px;-webkit-border-radius: 4px; }
			h3{ color: #D95656; font-size: 18px; letter-spacing: 1px;  margin: 10px 0 10px -20px; }
			h4{ color: #777; font-size: 18px; letter-spacing: 1px; }
			p{ margin: 10px 0; line-height: 150%; }
			a{ color: #7b94b2; }
			ul,ol{ margin: 10px 0 10px 40px; }
			li{ margin: 4px 0; }
			dl{ margin: 10px 0; }
			dl dt{ font-weight: bold; line-height: 20px; margin: 10px 0 0 0; }
			dl dd{ margin: -20px 0 10px 120px; padding-bottom: 10px; border-bottom: solid 1px #eee;}
			pre{ font-size: 12px; line-height: 16px; padding: 5px 5px 5px 10px; margin: 10px 0; background-color: #e4f4d4; border-left: solid 5px #9EC45F; overflow: auto; tab-size: 4; -moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; }
			input,select,textarea{ font-family: Consolas, monaco, monospace; font-size: 1rem; background-color: #ffffff; border: solid 1px #D2E1DE; 
				-webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box;
				border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; }
			input:focus, select:focus, textarea:focus{ border: solid 1px #ff958d; }

			.wrapper{ background-color: #ffffff; width: 600px; border: solid 1px #eeeeee; padding: 20px 20px 20px 40px; margin: 0 auto; border-radius: 6px; -moz-border-radius: 6px;-webkit-border-radius: 6px; }
			.header{ text-align: center;position: relative; margin: 0 -20px 0 -40px; }
			
			.header h1 span:before{ content: ''; display: block; width: 100%; }
			.header h1 span{ font-size: 65%;  }
			.header ul.nav{ margin: 10px 0; display: block; }
			.header ul.nav > li{ position: relative; display: inline-block; list-style: none; padding: 10px 0; width: 80px; }
			.header ul.nav > li > a{ text-transform: uppercase; color: #777; text-decoration: none; font-size: 12px; }
			.header ul.nav > li > a:hover{ color: #555; }
			.header ul.nav > li > ul{ display: none; padding: 10px; background-color: #777; text-align: left; border-radius: 4px; -moz-border-radius: 4px;-webkit-border-radius: 4px; }
			.header ul.nav > li > ul li{ display: block; width: 80px; }
			.header ul.nav > li > ul li a{ color: #fff; text-decoration: none; font-size: 12px; }
			.header ul.nav > li:hover > ul{ display: inline-block; position: absolute; top: 15px; left: -40px; }
			
			.header ul.scrollnav{ position: fixed; top: 0px; left: 50%; z-index: 9999999; background-color: #777; display: none; margin: 0 0 0 -254px; border-radius: 0 0 0 6px; -moz-border-radius: 0 0 0 6px;-webkit-border-radius: 0 0 0 6px;}
			.header ul.scrollnav li a{ color: #fff; }
			.header ul.scrollnav li a:hover{ color: #eee; }
			.header ul.scrollnav.scrolled{ display: inline; }

			.footer{ color: #777; margin: 20px 0 0 0; border-top: double 3px #ccc; font-size: 11px; }
			.clear{ clear: both; }
			
			.methoddl dd{ margin-top: 0; }
			.example-container{ border-bottom: double 3px #ccc; margin: 0 0 20px 0; padding: 0 0 20px 0; }
			.example-container input[type='text']{ padding: 8px 10px 9px 10px; width: 100%; }
			.example-container button{ border: none; color: #fff; padding: 4px 8px; background-color: #9ec45f; border-radius: 4px; -moz-border-radius: 4px;-webkit-border-radius: 4px; }

			.ebook{ background: #333 url(http://trentrichardson.com/wp-content/uploads/2013/10/handling-time-ebook.jpg) 10px 25px no-repeat; border-top: solid 4px #ddd; border-bottom: solid 4px #ddd; height: 210px; color: #eee; margin: 0 -20px 0 -40px; padding: 20px 20px 20px 200px; }
			.ebook h3{ color: #fff; margin: 10px 0; font-size: 28px; }
			.ebook p a{ color: #9EC45F; }
			.ebook .buyp a iframe{ margin-bottom: -10px; }

			dl.dl-options dd{ margin: -18px 0 10 150px; }
			dl.dl-formatting dd{ margin: -18px 0 10px 80px; }
			dl.dl-methods > dd{ margin: 5px 0 20px 40px; }
			dl.dl-methodopts dt{ font-weight: normal; font-style: italic; }
			dl.dl-methodopts dd{ margin: -18px 0 10px 80px; }
		</style> 
		
		<link rel="stylesheet" media="all" type="text/css" href="Intimidatetime.css" />
				
	</head> 
	<body> 
		<div class="wrapper">
			<div class="header">
				<h1>Intimidatetime <span>Date Time Picker for jQuery and Zepto<span></h1> 

				<ul class="nav">
					<li><a href="#Introduction" title="Introduction">Intro</a></li>
					<li><a href="#Options" title="Options">Options</a></li>
					<li><a href="#Methods" title="Methods">Methods</a>
							<ul>
								<li><a href="#Instance-Methods" title="Instance Methods">Instance</a></li>
								<li><a href="#Utility-Methods" title="Utility Methods">Utility</a></li>
							</ul>
						</li>
					<li><a href="#Events" title="Events">Events</a></li>
					<li><a href="#Formatting" title="Formatting">Format</a></li>
					<li><a href="#I18n" title="Internationalization">I18n</a></li>
					<li><a href="#Examples" title="Examples">Examples</a>
							<ul>
								<li><a href="#Examples-Basics" title="Basics">Basics</a></li>
								<li><a href="#Examples-Timezones" title="Timezones">Timezones</a></li>
								<li><a href="#Examples-Ranges" title="Ranges">Ranges</a></li>
							</ul>
						</li>
				</ul>
			</div>

			<div class="content">
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="Introduction" class="section">
	<h2>Introduction</h2>

	<p class="intro">Intimidatetime is a wicked awesome date time picker for both jQuery and Zepto.  It features high customization with low configuration.  Features include date ranges, unix timestamps, timezones, date utility methods, and more.</p>
	<p>The name itself is a play on words "intimidate" and "datetime".  Merged together we get IntimiDateTime, since the only real way to wrestle with time is to intimidate time!</p>
</div>

<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->

<div id="Get_Started" class="section">
	<h2>Get Started</h2>
	
	<h3>Highly Recommended</h3>
	<p>Subscribe to <a href="http://trentrichardson.com/category/impromptu/" title="TrentRichardson.com">my newsletter</a> and follow me <a href="http://twitter.com/practicalweb" title="Follow me on Twitter">@practicalweb</a>.</p>

	<div class="ebook">
		<h3>eBook: Handling Time</h3>
		<p>Learn about basic setup, i18n, timezones, and storing dates and times in a database.  eBook examples use <a href="http://trentrichardson.com/examples/timepicker" title="jQueryUI Timepicker Addon">jQueryUI Timepicker Addon</a>, however the principles learned are the same.</p>
		<p class="buyp"><a href="https://sellfy.com/p/8gxZ" id="8gxZ" class="sellfy-buy-button">buy</a> eBook + Example code</p>
		<p class="buyp"><a href="https://sellfy.com/p/LvAG" id="LvAG" class="sellfy-buy-button">buy</a> eBook</p>
		<div class="clear"></div>
	</div>

	<h3>Donation</h3>	
	<p>Has Intimidatetime been helpful to you?</p>
	<div class="donation">					
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
		<input type="hidden" name="cmd" value="_s-xclick">
		<input type="hidden" name="hosted_button_id" value="LF6AGYRBK6P2S">
		<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
		<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
		</form>
	</div>
	
	<h3 id="Download">Download</h3>
	<ul>
		<li><a href="https://github.com/trentrichardson/Intimidatetime" title="Fork it on Github">Github</a></li>
	</ul>

	<h3>Version</h3>
	<p>Version 0.2.0</p>
	<p>Last updated on 2014-07-08</p>

	<h3>License</h3>
	<p>Intimidatetime is currently available for use in all personal or commercial projects under the MIT license.</p>
	<ul>
		<li><a href="http://trentrichardson.com/Impromptu/MIT-LICENSE.txt" title="MIT License">MIT License</a></li>
	</ul>
	
</div>

<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="Options" class="section">
	<h2>Options</h2>

	<p>Options are subject to change.  Also visit the <a href="#I18n" title="I18n">I18n</a> for additional options:</p>
	
<pre>
{

	// Date object, array of Date objects, or strict formatted string to set as the value
	value: null,

	// picker time format
	previewFormat: null,

	// format shown in the alt field if used, defaults to format option
	altFormat: null,

	// jQuery element or selector for an alternate input
	alt: null,

	// min allowed date - date object or relative string '-1M'
	min: null,

	// max allowed date - date object or relative string '-1M'
	max: null,

	// number of ranges or pick list of dates, will generate a calendar side by side for each date
	ranges: 0,

	// string to delimit ranges. this string MUST NOT occur in the time format
	rangeDelimiter: ' - ',

	// relative date string for the minimum allowed difference between two dates
	rangeIntervalMin: '+0l',

	// relative date string for the maximum allowed difference between two dates
	rangeIntervalMax: null,

	// number of months to show at once
	months: 1,

	// 0-6, which day is the start of the week
	startOfWeek: 0,

	// whether the picker should be inline
	inline: false,

	// use theme to prefix all class names, change your css accordingly
	theme: 'intimidatetime',

	// how the picker is aligned: vertical, horizontal (maps to css styling, no logic). Or should this be "classes"?
	mode: 'basic',

	// define any and all units
	units: {
		year: { map: 'FullYear', type: 'select', range: 20, step: 1, format: 'yyyy', value: null},
		month: { map: 'Month', type: 'select', min: 0, max: 11, step: 1, format: 'MMM', value: null },
		day: { map: 'Date', type: 'select', min: 1, max: 31, step: 1, value: null },
		hour: { map: 'Hours', type: 'select', min: 0, max: 23, step: 1, value: null },
		minute: { map: 'Minutes', type: 'select', min: 0, max: 59, step: 1, value: null },
		second: { map: 'Seconds', type: 'select', min: 0, max: 59, step: 1, value: null },
		milli: { map: 'Milliseconds', type: 'select', min: 0, max: 999, step: 10, value: null },
		micro: { map: 'Microseconds', type: 'select', min: 0, max: 999, step: 10, value: null },
		timezone: { map: 'Timezone', type: 'select', value: null, options: [720,660,600,570,540,480,420,360,300,270,240,210,180,120,60, // just like Date.getTimezoneOffset()
				0,-60,-120,-180,-210,-240,-270,-300,-330,-345,-360,-390,-420,-480,-525,-540,-570,-600,-630,-660,-690,-720,-765,-780,-840],
				names: {} // Key value pairs mapping timezone values to text values { "-240": "EDT", "-300": "CDT".. }
			}
	},

	// the order which each module appears
	groups: [
		{ name: 'date', units: ['year', 'month', 'day'] },
		{ name: 'time', units: ['hour', 'minute', 'second', 'millisecond', 'microsecond', 'timezone'] }
	],

	// buttons can be added at the bottom of the picker
	buttons: [
		//{ text: 'Done', classes: '', tag: 'button', action: function(inst){} }
	],

	events: {
		// event fired on value change request, use event.preventDefault() or return false to prevent value change
		change: function(e, date, inst){},

		// event fired when the picker is (re)built
		refresh: function(e, inst){},

		// event fired to validate a day, use event.preventDefault() or return false to disable the day
		enableDay: function(e, date, inst){},

		// event fired when the picker is opened, use event.preventDefault() or return false to prevent opening
		open: function(e, inst){},

		// event fired when the picker is closed, use event.preventDefault() or return false to prevent closing
		close: function(e, inst){}
	}
}
</pre>

</div>
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="Methods" class="section">
	<h2>Methods</h2>

	<h3 id="Instance-Methods">Instance Methods</h3>

	<p>Instance methods are available through the intimidatetime jQuery plugin.  Calling these methods resemble:</p>

<pre>
var myPicker = $('.selector').intimidatetime();
mypicker.intimidatetime('open'); // open the picker
</pre>
	
	<p>The following instance methods are currently available:</p>

	<dl class="dl-methods">
		<dt>.intimidatetime('enable')</dt>
		<dd>
			<p>Enables the intimidatetime picker.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('disable')</dt>
		<dd>
			<p>Disables the intimidatetime picker.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('destroy')</dt>
		<dd>
			<p>Disables and removes the intimidatetime picker.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('open')</dt>
		<dd>
			<p>Opens the picker manually.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('close')</dt>
		<dd>
			<p>Closes the picker manually.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('option', 'key', 'value')</dt>
		<dd>
			<p>Gets or sets an option.</p>
			<dl class="dl-methodopts">
				<dt>key</dt><dd>String of the option value to get or set</dd>
				<dt>value</dt><dd>(optional) Value to set the option to.</dd>
				<dt>return</dt><dd>When setting the jQuery element. When getting returns the option's value.</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('value', val)</dt>
		<dd>
			<p>Gets or sets the picker's value.</p>
			<dl class="dl-methodopts">
				<dt>value</dt><dd>(optional) A Date object, or when using ranges and array of Date objects</dd>
				<dt>return</dt><dd>When setting the jQuery element. When getting returns the value (single Date or array of Dates when using ranges).</dd>
			</dl>
		</dd>


		<dt>.intimidatetime('refresh')</dt>
		<dd>
			<p>Rebuilds the picker.</p>
			<dl class="dl-methodopts">
				<dt>return</dt><dd>jQuery element</dd>
			</dl>
		</dd>

	</dl>

	<h3 id="Utility-Methods">Utility Methods</h3>

	<p>Utility/Static Methods are available through the $.intimidatetime object, so calling them resembles:</p>

<pre>
var num = $.intimidatetime.daysInMonth(5, 2001);
</pre>

	<p>The following utility methods are available:</p>

	<dl class="dl-methods">
		<dt>setDefaults(options)</dt>
		<dd>
			<p>Sets the defaults for intimidatetime instances</p>
			<dl class="dl-methodopts">
				<dt>options</dt><dd>object of intimidatetime options</dd>
				<dt>return</dt><dd>$.intimidatetime object</dd>
			</dl>
		</dd>


		<dt>dateClone(date)</dt>
		<dd>
			<p>Creates a clone of a date, with Intimidatetime's microsecond and timezone support.</p>
			<dl class="dl-methodopts">
				<dt>date</dt><dd>Javascript Date object to clone</dd>
				<dt>return</dt><dd>A new javascript Date object with the same value as requested</dd>
			</dl>
		</dd>
		

		<dt>dateParse(date, format, options)</dt>
		<dd>
			<p>Parse a date string with the specified format</p>
			<dl class="dl-methodopts">
				<dt>date</dt><dd>A date string</dd>
				<dt>format</dt><dd>A format string (see formatting options)</dd>
				<dt>options</dt><dd>Object of option values (see options and i18n)</dd>
				<dt>return</dt><dd>A javascript Date object</dd>
			</dl>
		</dd>
		

		<dt>dateRangeParse(dates, format, delimiter, options)</dt>
		<dd>
			<p>Parse a date string of date ranges with the specified format, dates split by delimiter</p>
			<dl class="dl-methodopts">
				<dt>dates</dt><dd>A string dates</dd>
				<dt>format</dt><dd>A format string for a single date(see formatting options)</dd>
				<dt>delimiter</dt><dd>A string that delimits each date.</dd>
				<dt>options</dt><dd>Object of option values (see options and i18n)</dd>
				<dt>return</dt><dd>Array of javascript Date objects</dd>
			</dl>
		</dd>
		

		<dt>dateRelative(date, relative)</dt>
		<dd>
			<p>Compute and return a new date relative to the given one.</p>
			<dl class="dl-methodopts">
				<dt>date</dt><dd>A javascript Date to base the calculation from</dd>
				<dt>relative</dt><dd>A string with a date calclulation (ex: "+2y", "-1M+5d").  Use a +/- followed by the number of units followed by the unit (y=year, M=month, d=day, h=hour, m=minute, s=second, l=millisecond, c=microsecond).</dd>
				<dt>return</dt><dd>A javascript Date object of the new date value.</dd>
			</dl>
		</dd>
		

		<dt>dateFormat(date, format, options)</dt>
		<dd>
			<p>Format a Date object to the given format</p>
			<dl class="dl-methodopts">
				<dt>date</dt><dd>A javascript Date object</dd>
				<dt>format</dt><dd>A format string (see formatting options)</dd>
				<dt>options</dt><dd>Object of option values (see options and i18n)</dd>
				<dt>return</dt><dd>A string of the formattd date</dd>
			</dl>
		</dd>
		

		<dt>dateRangeFormat: function(dates, format, delimiter, options)</dt>
		<dd>
			<p>Format an array of dates into a date range string with the specified format, dates split by delimiter</p>
			<dl class="dl-methodopts">
				<dt>dates</dt><dd>A array of Javascript Date objects</dd>
				<dt>format</dt><dd>A format string for a single date(see formatting options)</dd>
				<dt>delimiter</dt><dd>A string that delimits each date.</dd>
				<dt>options</dt><dd>Object of option values (see options and i18n)</dd>
				<dt>return</dt><dd>A string of formatted dates</dd>
			</dl>
		</dd>
		

		<dt>timezoneOffsetNumber(tzString, lookup)</dt>
		<dd>
			<p>Compute the number of minutes offset for a timezone string (ex: "-0400" gives 240)</p>
			<dl class="dl-methodopts">
				<dt>tzString</dt><dd>A timezone string (ex: "-0400" or "Z" for iso1806</dd>
				<dt>lookup</dt><dd>Object of timezone translation key value pairs.  When the tzString isn't directly computable it will try to lookup the string.  For example if you pass "EST" it may not be directly computable, if the lookup contains { "260": "EST" } it can return a value. See timezone names in Options.</dd>
				<dt>return</dt><dd>Number of minutes needed to return to GMT</dd>
			</dl>
		</dd>
		

		<dt>daysInMonth(m, y)</dt>
		<dd>
			<p>Compute the number of days in a month</p>
			<dl class="dl-methodopts">
				<dt>m</dt><dd>A number indicating the month. 0=January, 11=December, just like a javascript Date.</dd>
				<dt>y</dt><dd>A number indicating the year.</dd>
				<dt>return</dt><dd>Number of days in the month</dd>
			</dl>
		</dd>
		

		<dt>detectSupport(timeFormat)</dt>
		<dd>
			<p>Scan a timeFormat string and determine what features should be supported.</p>
			<dl class="dl-methodopts">
				<dt>timeFormat</dt><dd>A string containing format tokens</dd>
				<dt>return</dt><dd>An object of boolean values of each supported feature.</dd>
			</dl>
		</dd>
		

		<dt>log([])</dt>
		<dd>
			<p>Log to the console, when available any number of arguments</p>
			<dl class="dl-methodopts">
				<dt>args</dt><dd>Any number of arguments of any type</dd>
				<dt>return</dt><dd>Void</dd>
			</dl>
		</dd>

	</dl>

</div>
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="Events" class="section">
	<h2>Events</h2>

	<p>Events may be passed through the options (see <a href="#Options" title="Options">Options</a> for avaible events) or you can bind to them manually:</p>
<pre>
var myPicker = $('.selector').intimidatetime();

myPicker.on('intimidatetime:change', function(e, date, inst){
	console.log('Time Changed!');
});
</pre>
	<p>Notice the "intimidatetime:" indicates the namespace for the events, then the event name.</p>
</div>
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->

<div id="Formatting" class="section">
	<h2>Formatting</h2>

	<p>Formatting your date/time uses special tokens inside a string.  The following are the tokens allowed and their meaning.</p>
	
	<dl class="dl-formatting">
		<dt>u</dt><dd>Unix timestamp (seconds)</dd>
		<!-- <dt>uu</dt><dd>Unix timestamp (seconds with milliseconds behind decimal)</dd>
		<dt>uuu</dt><dd>Unix timestamp (milliseconds)</dd> -->
		<dt>yy</dt><dd>Two digit year</dd>
		<dt>yyyy</dt><dd>Four digit year</dd>
		<dt>M</dt><dd>Month with no leading 0</dd>
		<dt>MM</dt><dd>Month with leading 0</dd>
		<dt>MMM</dt><dd>Month name abbreviation as defined in i18n</dd>
		<dt>MMMM</dt><dd>Month name as defined in i18n</dd>
		<dt>d</dt><dd>Day with no leading 0</dd>
		<dt>dd</dt><dd>Day with leading 0</dd>
		<dt>ddd</dt><dd>Day name abbreviation as defined in i18n</dd>
		<dt>dddd</dt><dd>Day name as defined in i18n</dd>
		<dt>HH</dt><dd>Hour with leading 0 (24 hour)</dd>
		<dt>h</dt><dd>Hour with no leading 0 (12 hour)</dd>
		<dt>hh</dt><dd>Hour with leading 0 (12 hour)</dd>
		<dt>m</dt><dd>Minute with no leading 0</dd>
		<dt>mm</dt><dd>Minute with leading 0</dd>
		<dt>s</dt><dd>Second with no leading 0</dd>
		<dt>ss</dt><dd>Second with leading 0</dd>
		<dt>l</dt><dd>Milliseconds always with leading 0</dd>
		<dt>c</dt><dd>Microseconds always with leading 0</dd>
		<dt>t</dt><dd>a or p for AM/PM</dd>
		<dt>T</dt><dd>A or P for AM/PM</dd>
		<dt>tt</dt><dd>am or pm for AM/PM</dd>
		<dt>TT</dt><dd>AM or PM for AM/PM</dd>
		<dt>z</dt><dd>Timezone as defined by timezoneList</dd>
		<dt>zz</dt><dd>Timezone as defined by timezoneList, but in Iso 8601 format (+04:45)</dd>
		<dt>zzz</dt><dd>Timezone as defined by i18n timezone names. (You must define these)</dd>
		<dt>'...'</dt><dd>Literal text (Uses single quotes)</dd>
	</dl>

</div>
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="I18n" class="section">
	<h2>Internationalization (i18n)</h2>

	<p>Intimidate time comes with full support for i18n.  You can create your own or use the pre-built ones in the i18n directory by simply including it in your page.</p>

<pre>
$.intimidatetime.i18n['en'] = {
	format: 'yyyy-MM-dd HH:mm',      // default format 'yyyy-MM-dd hh:mm:ss:l tt z'
	units: {
		year: { 
				format: 'yyyy',      // how should hour be forrmated in drowdown
				label: 'Year'        // year label
			},
		month: { 
				format: 'MMM',       // how should hour be forrmated in drowdown
				label: 'Month',      // month label
				names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 
				namesAbbr: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
			},
		day: { 
				format: 'd',         // how should hour be forrmated in drowdown 
				label: 'Day',        // day label
				names: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
				namesAbbr: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
				namesHead: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
			},
		hour: {  
				format: 'HH',        // how should hour be forrmated in drowdown
				label: 'Hour',       // hour label
				am: ['AM', 'A'],     // possible am names
				pm: ['PM', 'P']     // possible pm names
			},
		minute: { 
				format: 'mm',        // how should minute be formatted in dropdown
				label: 'Minute'      // minute label
			},
		second: { 
				format: 'ss',        // how should second be formatted in dropdown
				label: 'Second'      // second label
			},
		millisecond: { 
				format: 'l',         // how should millisecond be formatted in dropdown
				label: 'Millisecond' // millisecond label
			},
		microsecond: { 
				format: 'c',         // how should millisecond be formatted in dropdown
				label: 'Microsecond' // microsecond label
			},
		timezone: { 
				format: 'z',         // how should timezone be formatted in dropdown
				label: 'Timezone'    // minute label
			}
	},
	rtl: false
};
$.intimidatetime.setDefaults($.intimidatetime.i18n['en']);
</pre>

</div>
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="Examples" class="section">
	<h2>Examples</h2>
					



	<h3 id="Examples-Basics">Basics</h3>
					


<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>A timepicker in the simplest fashion.</p>
	
	<input type="text" id="ex_basic_1" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_basic_1').intimidatetime();
</pre>
</div>

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>Add a few options, change the format.  Intimidate time detects which time units are needed by the format.</p>
	
	<input type="text" id="ex_basic_2" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_basic_2').intimidatetime({
	format: 'MMM d, yyyy'
});
</pre>
</div>

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>Use the preview format, this is useful when you need to generate a Unix timestamp.</p>
	
	<input type="text" id="ex_basic_3" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_basic_3').intimidatetime({
	format: 'u',
	previewFormat: 'yyyy-MM-dd HH:mm:ss'
});
</pre>
</div>

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>You can add on extra functionality by using buttons.  Pass an array of as many as you like.</p>
	
	<input type="text" id="ex_basic_4" value="" class="inputFull"/>
	

<pre class="code">
var $basicEx4 = $('#ex_basic_4').intimidatetime({
	buttons: [
			{ 
				text: 'Done', 
				action: function(e){ $basicEx4.intimidatetime('close'); return false; } 
			},
			{ 
				text: 'Now', 
				action: function(e){ $basicEx4.intimidatetime('value', new Date() ); return false; }
			}
		]
});
</pre>
</div>


<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>You can change input types using the units.{unit type}.type option.</p>
	
	<input type="text" id="ex_basic_5" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_basic_5').intimidatetime({
	format: 'MMM yyyy',
	units: {
		year: { type: 'list', options: [2013,2014,2015] },
		month: { type: 'list', format: 'MMMM' }
	}
});
</pre>
</div>






	<h3 id="Examples-Timezones">Timezones</h3>

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>You can enable timezones with the "z" format token.</p>
	
	<input type="text" id="ex_timezone_1" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_timezone_1').intimidatetime({
	format: 'yyyy-MM-dd HH:mm z'
});
</pre>
</div>
					


<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>Suppose you want the user to have more readable timezone descriptions, but behind the scenes Intimidate time needs the numeric timezone.  We can pass a few timezone options.</p>
	<p>The option values must be minute offsets from utc.  Just like Date.getTimezoneOffset() the offset for -0400 is 240.  Intimidatetime tries to follow the path laid by javascript.  Then You can assign names to each value.</p>
	
	<input type="text" id="ex_timezone_2" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_timezone_2').intimidatetime({
	format: 'yyyy-MM-dd HH:mm zzz',
	units: {
		timezone: {
			format: 'zzz',
			options: [240,300,360,420],
			names: {
				"240": "EDT", 
				"300": "CDT", 
				"360": "MDT",
				"420": "PDT"
			}
		}
	}
});
</pre>
</div>





	<h3 id="Examples-Ranges">Ranges</h3>
					

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>Ranges are very simple, just use the range option.</p>
	
	<input type="text" id="ex_ranges_1" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_ranges_1').intimidatetime({
	ranges: 1
});
</pre>
</div>				

<!-- ---------------------------------------------- -->
<div class="example-container">
	<p>Sometimes maybe you don't want a range necessarily, but a list of dates.  Use the rangeDelimiter and range options together.  Here we request 3 dates.</p>
	
	<input type="text" id="ex_ranges_2" value="" class="inputFull"/>
	

<pre class="code">
$('#ex_ranges_2').intimidatetime({
	format: 'yyyy-MM-dd',
	ranges: 2,
	rangeDelimiter: ', '
});
</pre>
</div>

					
</div><!-- end #Examples -->
			</div>

			<div class="footer">

			</div>
		</div>

		<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> -->
		<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
		<script type="text/javascript" src="Intimidatetime.js"></script>
		<!-- <script type="text/javascript" src="i18n/Intimidatetime-es.js"></script> -->
		<script type="text/javascript">
			
			$(function(){
				// quick routine for scrolling nav
				var $nav = $('.header ul.nav'),
					navoffset = $nav.offset(),
					$navclone = $nav.clone().addClass('scrollnav').appendTo('.header'),
					$window = $(window);
				$window.scroll(function(e){
					if((navoffset.top+50) < $window.scrollTop()){
						if(!$navclone.hasClass('scrolled'))
							$navclone.addClass('scrolled');
					}
					else $navclone.removeClass('scrolled');
				}).scroll();

				// run the examples
				$('.example-container').each(function(i,el){
					var $ex = $(this),
						$run = $ex.find('.run'),
						code = $ex.find('.code').text();
					if($run.length){
						$run.click(function(e){
							e.preventDefault();
							(new Function(code))();
						});
					}
					else{
						(new Function(code))();
					}
				});
			});
			
		</script>
		
		<script type="text/javascript" src="https://sellfy.com/js/api_buttons.js"></script>
		
		<script type="text/javascript">/*
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
		*/</script>
		<script type="text/javascript">/*
		try {
		var pageTracker = _gat._getTracker("UA-7602218-1");
		pageTracker._trackPageview();
		} catch(err) {}*/</script>

	</body>
</html>