Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / dateformat / Readme.md
1 # dateformat
2
3 A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.
4
5 [![Build Status](https://travis-ci.org/felixge/node-dateformat.svg)](https://travis-ci.org/felixge/node-dateformat)
6
7 ## Modifications
8
9 * Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.
10 * Added a `module.exports = dateFormat;` statement at the bottom
11 * Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week
12
13 ## Installation
14
15 ```bash
16 $ npm install dateformat
17 $ dateformat --help
18 ```
19
20 ## Usage
21
22 As taken from Steven's post, modified to match the Modifications listed above:
23 ```js
24     var dateFormat = require('dateformat');
25     var now = new Date();
26
27     // Basic usage
28     dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
29     // Saturday, June 9th, 2007, 5:46:21 PM
30
31     // You can use one of several named masks
32     dateFormat(now, "isoDateTime");
33     // 2007-06-09T17:46:21
34
35     // ...Or add your own
36     dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
37     dateFormat(now, "hammerTime");
38     // 17:46! Can't touch this!
39
40     // When using the standalone dateFormat function,
41     // you can also provide the date as a string
42     dateFormat("Jun 9 2007", "fullDate");
43     // Saturday, June 9, 2007
44
45     // Note that if you don't include the mask argument,
46     // dateFormat.masks.default is used
47     dateFormat(now);
48     // Sat Jun 09 2007 17:46:21
49
50     // And if you don't include the date argument,
51     // the current date and time is used
52     dateFormat();
53     // Sat Jun 09 2007 17:46:22
54
55     // You can also skip the date argument (as long as your mask doesn't
56     // contain any numbers), in which case the current date/time is used
57     dateFormat("longTime");
58     // 5:46:22 PM EST
59
60     // And finally, you can convert local time to UTC time. Simply pass in
61     // true as an additional argument (no argument skipping allowed in this case):
62     dateFormat(now, "longTime", true);
63     // 10:46:21 PM UTC
64
65     // ...Or add the prefix "UTC:" or "GMT:" to your mask.
66     dateFormat(now, "UTC:h:MM:ss TT Z");
67     // 10:46:21 PM UTC
68
69     // You can also get the ISO 8601 week of the year:
70     dateFormat(now, "W");
71     // 42
72
73     // and also get the ISO 8601 numeric representation of the day of the week:
74     dateFormat(now,"N");
75     // 6
76 ```
77 ## License
78
79 (c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.
80
81 [dateformat]: http://blog.stevenlevithan.com/archives/date-time-format
82 [stevenlevithan]: http://stevenlevithan.com/