Are you over 18 and want to see adult content?
More Annotations
![Editorialist | Luxury Fashion Accessories Magazine & Online Store](https://www.archivebay.com/archive/96901b41-9d31-44e7-82e3-438c5d3e971e.png)
Editorialist | Luxury Fashion Accessories Magazine & Online Store
Are you over 18 and want to see adult content?
![Continuous Improvement Resources for Improvement-Oriented Companies | Velaction Continuous Improvement](https://www.archivebay.com/archive/171e0974-c66c-4041-97c7-b2633a93de79.png)
Continuous Improvement Resources for Improvement-Oriented Companies | Velaction Continuous Improvement
Are you over 18 and want to see adult content?
![CreditLine - Interest Free Shopping & Cash Card](https://www.archivebay.com/archive/1eb6390b-87c6-460f-9c8a-7a65cd1d653b.png)
CreditLine - Interest Free Shopping & Cash Card
Are you over 18 and want to see adult content?
![Flash File Tool - Download All Android Flash File Tool and Firmware](https://www.archivebay.com/archive/44b0d4f8-0409-4ad1-9747-57c960ef0fb4.png)
Flash File Tool - Download All Android Flash File Tool and Firmware
Are you over 18 and want to see adult content?
![Schnäppchen, Gratisartikel, Produkttests, kostenlose Proben » Pfennigfuchs.com](https://www.archivebay.com/archive/cde10731-60b5-4641-9785-71d32d7d8e68.png)
Schnäppchen, Gratisartikel, Produkttests, kostenlose Proben » Pfennigfuchs.com
Are you over 18 and want to see adult content?
![InstaxStore.cz - Fotoaparáty, filmy a příslušenství Instax | Autorizovaný prodejce FujiFilm](https://www.archivebay.com/archive/9ec30e1b-f262-4173-bad4-f3b493fc2057.png)
InstaxStore.cz - Fotoaparáty, filmy a příslušenství Instax | Autorizovaný prodejce FujiFilm
Are you over 18 and want to see adult content?
![Tour a Ciudad Perdida - Salidas diarias desde Santa Marta](https://www.archivebay.com/archive/d1cdb05f-fcca-49f4-87fd-a66260d08e93.png)
Tour a Ciudad Perdida - Salidas diarias desde Santa Marta
Are you over 18 and want to see adult content?
![Sklep wojskowy, militarny i myśliwski - Zbrojownia.pl](https://www.archivebay.com/archive/8079b90c-b3c6-46a6-a744-79f540269cd8.png)
Sklep wojskowy, militarny i myśliwski - Zbrojownia.pl
Are you over 18 and want to see adult content?
![Über 50 - 50PLUS.ch – im besten Alter, Senioren haben mehr vom Leben](https://www.archivebay.com/archive/8af4ecb1-aa90-4a3b-8455-e793733dd62b.png)
Über 50 - 50PLUS.ch – im besten Alter, Senioren haben mehr vom Leben
Are you over 18 and want to see adult content?
Favourite Annotations
![A complete backup of https://mrsdeangelo.weebly.com/](https://www.archivebay.com/archive6/images/5e7b125c-a1b1-4b83-81b5-e3dad51fcfe3.png)
A complete backup of https://mrsdeangelo.weebly.com/
Are you over 18 and want to see adult content?
![A complete backup of https://www.thefreedictionary.com/have+a+look](https://www.archivebay.com/archive6/images/cad1b2a8-8dc6-4586-9b19-fbc34854f4d7.png)
A complete backup of https://www.thefreedictionary.com/have+a+look
Are you over 18 and want to see adult content?
![A complete backup of https://webslon.info/www/rhreporting.nic.in](https://www.archivebay.com/archive6/images/4f0e61d4-4443-4df9-9fda-8d46a08984c4.png)
A complete backup of https://webslon.info/www/rhreporting.nic.in
Are you over 18 and want to see adult content?
![A complete backup of https://www.tarafdari.com/node/1130137](https://www.archivebay.com/archive6/images/c8d070b6-6381-49ce-b2e3-4204486e6a29.png)
A complete backup of https://www.tarafdari.com/node/1130137
Are you over 18 and want to see adult content?
![A complete backup of https://www.kurtvip.com/abi-npyn-mk/](https://www.archivebay.com/archive6/images/fbb1147c-edb8-4b11-9306-fcbb2adbcb47.png)
A complete backup of https://www.kurtvip.com/abi-npyn-mk/
Are you over 18 and want to see adult content?
![A complete backup of https://safeweb.norton.com/](https://www.archivebay.com/archive6/images/1124814e-4468-4aba-9114-113cba4dc5c8.png)
A complete backup of https://safeweb.norton.com/
Are you over 18 and want to see adult content?
![A complete backup of https://euts.me/ammayi-kambi-kadha-59/](https://www.archivebay.com/archive6/images/df9bc0f0-4ba3-4a2f-aba9-e29b5f5188c6.png)
A complete backup of https://euts.me/ammayi-kambi-kadha-59/
Are you over 18 and want to see adult content?
![A complete backup of https://www.kaufmich.com/Latexmausi](https://www.archivebay.com/archive6/images/3fa3f528-3241-43fe-a44f-d1797937c9b8.png)
A complete backup of https://www.kaufmich.com/Latexmausi
Are you over 18 and want to see adult content?
Text
Skip to content
* Why GitHub?
Features →
* Code review
* Project management* Integrations
* Actions
* Packages
* Security
* Team management
* Hosting
* Customer stories →* Security →
* Team
* Enterprise
* Explore
* Explore GitHub →LEARN & CONTRIBUTE
* Topics
* Collections
* Trending
* Learning Lab
* Open source guidesCONNECT WITH OTHERS
* Events
* Community forum
* GitHub Education
* Marketplace
* Pricing
Plans →
* Compare plans
* Contact Sales
* Nonprofit →
* Education →
*
In this repository All GitHub ↵Jump to ↵
* No suggested jump to results*
In this repository All GitHub ↵Jump to ↵
*
In this repository All GitHub ↵Jump to ↵
Sign in Sign up
DATEJS / DATEJS
* Watch 72
* Star 1.6k
* Fork 398
*
Code
*
Issues 92
*
Pull requests 1
*
Actions
*
Projects 0
*
Wiki
*
Security 0
*
Insights
Dismiss
JOIN GITHUB TODAY
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
A JavaScript Date and Time Library* 224 commits
* 2 branches
* 0 packages
* 0 releases
* 15 contributors
* View license
JavaScript HTML CSS
* JavaScript 97.7%
* HTML 1.8%
* CSS 0.5%
_Branch:_ master
New pull request
Find file Clone or downloadCLONE WITH HTTPS
Use Git or checkout with SVN using the web URL.Download ZIP
DOWNLOADING
Want to be notified of new releases in datejs/Datejs?Sign in
Sign up
LAUNCHING GITHUB DESKTOP If nothing happens, download GitHub Desktopand try again.
Go back
LAUNCHING GITHUB DESKTOP If nothing happens, download GitHub Desktopand try again.
Go back
LAUNCHING XCODE
If nothing happens, download Xcodeand try again.
Go back
LAUNCHING VISUAL STUDIO If nothing happens, download the GitHub extension for Visual Studioand try again.
Go back
LATEST COMMIT
dependabot-preview
and
geoffreymcgill
Bump mixin-deep from 1.3.1 to 1.3.2 (#137) …
Bumps (https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. **This update includes a security fix.** - (https://github.com/jonschlinkert/mixin-deep/releases) - (jonschlinkert/mixin-deep@1.3.1...1.3.2 ) Signed-off-by: dependabot-previewon
Aug 27, 2019
FILES
Permalink
TYPE
NAME
LATEST COMMIT MESSAGECOMMIT TIME
Failed to load latest commit information.build
Fix inconsistent encoding and line endings (#107
)
3 years ago
src
Formatting
11 months ago
test
Fix inconsistent encoding and line endings (#107
)
3 years ago
.gitattributes
Fix inconsistent encoding and line endings (#107
)
3 years ago
.gitignore
added build process to gulp file (for en-US only)5 years ago
CHANGELOG.md
Fix inconsistent encoding and line endings (#107
)
3 years ago
CLA.md
Corrected link to CONTRIBUTING document5 years ago
CONTRIBUTING.md
Formatting
11 months ago
LICENSE
Formatting
11 months ago
README.md
Fix link to Format Specifiers page on wiki (#125
)
11 months ago
TODO.md
Fix inconsistent encoding and line endings (#107
)
3 years ago
gulpfile.js
added a package.json file, i18n build5 years ago
package-lock.json
Bump mixin-deep from 1.3.1 to 1.3.2 (#137)
8 months ago
package.json
Bump run-sequence from 1.2.2 to 2.2.1 (#128)
11 months ago
README.MD
OVERVIEW
DATEJS is an open source JavaScript Date library for parsing, formatting and processing. The last official release was ALPHA-1 on November 19th, 2007. The project has been mostly dormant since that early release.GETTING STARTED
We recommend including one of the .js files from within the /build/folder.
Within the /build/ folder, a DATE.JS file has been created for each of the 150+ supported Cultures. Changing the Culture of the library is as easy as changing the DATE.JS file. Before minification, the Datejs library is contained in six (6) separate JavaScript files. Each of the files can be includedindividually.
The following is a list of precedence IF INCLUDING THE FILES INDIVIDUALLY. Each file requires the one above it. For example, core.js requires a CultureInfo file. 1. CultureInfo Contains all Globalized strings and culture specific properties. Debug versions available within the /src/globalization/ folder. 2. core.js All core Date processing logic. 3. parser.js All parsing logic. 4. sugarpak.js* All syntactical sugar. 5. time.js** TimeSpan and TimePeriod classes. 6. extras.js** PHP/Unix date format conversion functions. * The parser.js file is not required for sugarpak.js ** The time.js and extras.js files are optional and are not included in the compiled /build/ versions.EXAMPLE USAGE
SYNTAX OVERVIEW
Date.today() // Returns today's date, with time set to 00:00 (start of day). Date.today().next().friday() // Returns the date of the next Friday. Date.today().last().monday() // Returns the date of the previous Monday. new Date().next().march() // Returns the date of the next March. new Date().last().week() // Returns the date one week ago. Date.today().is().friday() // Returns true|false if the day-of-week matches. Date.today().is().fri() // Abbreviated day names. Date.today().is().november() // Month names. Date.today().is().nov() // Abbreviated month names. Date.today().is().weekday() // Is today a weekday? Date.today().addDays(1) // Add one day (+1). Date.today().addMonths(-3) // Subtract three months (-3). Date.today().add(1).day() // Add one (+1) day. Supports all date parts (year, month, day, hour, minute, second, millisecond, and weeks) Date.today().add(-3).months() // Subtract three (-3) months. (1).day().fromNow() // One (1) day from now. (3).months().ago() // Three (3) months ago.var n = 6;
n.months().fromNow() // Six (6) months from now. Date.monday() // Returns Monday of the current week. Date.mon() // Abbreviated version of Date.monday() Date.march() // Returns March 1st of this year. Date.mar() // Abbreviated version of Date.march() Date.today().first().thursday() // Returns the first Thursday of the current month. Date.today().second().thursday()// Returns the second Thursday of the current month. Date.march().third().thursday() // Returns the third Thursday in March of the current year. Date.october().fourth().sunday()// Returns the fourth Sunday in October. Date.today().fifth().sunday() // Returns the fifth Sunday in the current month, or throws a RangeError exception if there are not 5 Sundays in the current month. Date.october().final().sunday() // Returns the final Sunday in October. Date.january().first().monday() // Returns the first Monday of the current year. Date.december().final().friday()// Returns the last Friday of the current year. Date.today().at("6:15pm"); // Returns todays date at 6:15pm. var time = {hour:18, minute:15}; Date.today().at(time); // Set time with a config object. var birthDayParty = {month: 1, day: 20, hour: 20, minute: 30}; Date.today().set(birthDayParty);// Set date and time with a config object.PARSING
The following list is only a small subset of hundreds of string formats which can be parsed correctly without providing a date format. All parsing is fully Globalized by including the appropriate CultureInfo file. The CultureInfo file contains all the strings used for parsing and formatting. All CultureInfo files can be found in the /trunk/source/globalization/folder.
The following .parse() samples use the en-US.js CultureInfo file. Date.parse("t") // Returns today's date. Date.parse("today") // Returns today's date. Date.parse("tomorrow") // Returns tomorrow's date. Date.parse("yesterday") // Returns yesterday's date. Date.parse("next friday") // Returns the date of the next Friday. Date.parse("last monday") // Returns the date of the previous Monday. Date.parse("July 8th, 2004") // Thu Jul 08 2004 Date.parse("15-Jan-2004") // Thu Jan 15 2004 Date.parse("7/1/2004") // Thu Jul 01 2004 Date.parse("7.1.2004") // Thu Jul 01 2004 Date.parse("07.15.04") // Thu Jul 15 2004 Date.parse("July 23rd 2004") // Fri Jul 23 2004 Date.parse("Sat July 3, 2004") // Sat Jul 03 2004 Date.parse("10:30 PM EST") // Wed Oct 31 2007 20:30:00 Date.parse("10PM") // Wed Oct 31 2007 22:00:00 Date.parse("t + 5d") // Adds 5 days to today. Date.parse("today - 1 month") // Subtracts 1 month from today. Date.parse("+") // Add 1 day to today = tomorrow. Date.parse("- 3months") // Subtract 3 months. Date.parse("+1year") // Add a year to today. Date.parse("-12 months") // Subtract 12 months (1 year) from today. Date.parse("July 4th") // July 4th of this year. Date.parse("15") // 15th day of current month/year. Date.parse("July 8th, 2004, 10:30 PM") // Thu Jul 08 2004 22:30:00 Date.parse("2004-07-15T06:45:00") // Thu Jul 15 2004 06:45:00 Date.parse("Thu, 1 July 2004 22:30:00 GMT") // Thu Jul 01 2004 16:30:00 Date.parse("1997-07-16T19:20:15") // ISO 8601 Formats Date.parse("1997-07-16T19:20:30+01:00") // ISO 8601 with Timezone offset Date.parse("1985-04-12T23:20:50Z") // RFC 3339 FormatsCHAINING
Date.today().add({ months: 1, days: 5 }).is().fri() // Add 1 month and 5 days, then check if that date is a Friday. Date.parse("10-July-2004").next().friday().add(-1).month() // Take in a date, then move to the next Friday and subtract a month.COMPARISON
Date.today().equals( Date.parse("today")) // true|false Date.parse("last Tues").equals(Date.today()) // true|false Date.equals(Date.today(), Date.parse("today")) // true|false Date.compare(Date.today(), Date.parse("today")) // 1 = greater, -1 = less than, Date.today().compareTo(Date.parse("yesterday")) // 1 = greater, -1 = less than, 0 = equal Date.today().between(startDate, endDate) // true|false CONVERTING TO STRING NOTE The format parameter is optional with the .toString() function. If no format is provided, the native JavaScript Date .toString() function will be called. A detailed list of supported FormatSpecifiers is listed in the FormatSpecifiers
page on the wiki.
STANDARD DATE AND TIME FORMAT SPECIFIERSFORMAT
DESCRIPTION
EXAMPLE
s
The seconds of the minute between 0-59.0 to 59
ss
The seconds of the minute with leading zero if required.00 to 59
m
The minute of the hour between 0-59.0 or 59
mm
The minute of the hour with leading zero if required.00 to 59
h
The hour of the day between 1-12.1 to 12
hh
The hour of the day with leading zero if required.01 to 12
H
The hour of the day between 0-23.0 to 23
HH
The hour of the day with leading zero if required.00 to 23
d
The day of the month between 1 and 31.1 to 31
dd
The day of the month with leading zero if required.01 to 31
ddd
Abbreviated day name. Date.CultureInfo.abbreviatedDayNames.Mon to Sun
dddd
The full day name. Date.CultureInfo.dayNames.Monday to Sunday
M
The month of the year between 1-12.1 to 12
MM
The month of the year with leading zero if required.01 to 12
MMM
Abbreviated month name. Date.CultureInfo.abbreviatedMonthNames.Jan to Dec
MMMM
The full month name. Date.CultureInfo.monthNames.January to December
yy
Displays the year as a two-digit number.99 or 07
yyyy
Displays the full four digit year.1999 or 2007
t
Displays the first character of the A.M./P.M. designator. Date.CultureInfo.amDesignator or Date.CultureInfo.pmDesignatorA or P
tt
Displays the A.M./P.M. designator. Date.CultureInfo.amDesignator or Date.CultureInfo.pmDesignatorAM or PM
S
The ordinal suffix of the current day.st, nd, rd, or th
_Custom Date and Time Format Specifiers_FORMAT
DESCRIPTION
EXAMPLE
d
The CultureInfo shortDate Format PatternM/d/yyyy
D
The CultureInfo longDate Format Patterndddd, MMMM dd, yyyy
F
The CultureInfo fullDateTime Format Pattern dddd, MMMM dd, yyyy h:mm:ss ttm
The CultureInfo monthDay Format PatternMMMM dd
r
The CultureInfo rfc1123 Format Pattern ddd, dd MMM yyyy HH:mm:ss GMTs
The CultureInfo sortableDateTime Format Patternyyyy-MM-ddTHH:mm:ss
t
The CultureInfo shortTime Format Patternh:mm tt
T
The CultureInfo longTime Format Patternh:mm:ss tt
u
The CultureInfo universalSortableDateTime Format Pattern yyyy-MM-dd HH:mm:ssZy
The CultureInfo yearMonth Format PatternMMMM, yyyy
SEPARATOR CHARACTERSCHARACTER
NAME
/
forward slash
space
.
period
-
hyphen
,
comma
new Date().toString() // "Wed Oct 31 2007 16:18:10 GMT-0700 (Pacfic Daylight Time)" new Date().toString("M/d/yyyy") // "10/31/2007" Date.today().toString("d-MMM-yyyy") // "31-Oct-2007" new Date().toString("HH:mm") // "16:18" Date.today().toString("MMMM dS, yyyy") // "April 12th, 2008" Date.today().toShortDateString() // "10/31/2007". Culture specific as per Date.CultureInfo.shortDatePattern. Date.today().toLongDateString() // "Wednesday, October 31, 2007". Culture specific as per Date.CultureInfo.longDatePattern. new Date().toShortTimeString() // "4:18 PM". Culture specific as per Date.CultureInfo.shortTimePattern. new Date().toLongTimeString() // "4:18:34 PM". Culture specific as per Date.CultureInfo.longTimePattern.CORE
Date.today().set({ day: 15 }) // Sets the day to the 15th of the current month and year. Other object values include year|month|day|hour|minute|second. Date.today().set({ year: 2007, month: 1, day: 20 }) Date.today().add({ days: 2 }) // Adds 2 days to the Date. Other object values include year|month|day|hour|minute|second. Date.today().add({ years: -1, months: 6, hours: 3 }) Date.today().addYears(1) // Adds 1 year. Date.today().addMonths(-2) // Subtracts 2 months. Date.today().addWeeks(1) // Adds 1 week. Date.today().addDays(4) // Adds 4 days. Date.today().addHours(6) // Adds 6 hours. Date.today().addMinutes(-30) // Subtracts 30 minutes. Date.today().addSeconds(15) // Adds 15 seconds. Date.today().addMilliseconds(200) // Adds 200 milliseconds. Date.today().moveToFirstDayOfMonth() // Returns the first day of the current month. Date.today().moveToLastDayOfMonth() // Returns the last day of the current month. new Date().clearTime() // Sets the time to 00:00 (start of the day). Date.today().setTimeToNow() // Resets the time to the current time (now). The functional opposite of .clearTime()ISO 8601
// Parse ISO 8601 string Date.parse("\"1997-07-16T19:20:15\"") // ISO 8601 string format with wrapping double-quotes // Convert date to ISO 8601 string new Date().toISOString() // Returns ISO 8601 string of date converted to it's UTC value. "2007-10-31T16:18:00Z" // Get UTC converted ISO week number Date.today().getISOWeek() // Returns ISO 8601 week of year. Returns "01" to ("52" | "53") depending on the year. See also .getWeek()MISC
Date.getMonthNumberFromName("March") // 2 - CultureInfo specific.* Terms
* Privacy
* Security
* Status
* Help
* Contact GitHub
* Pricing
* API
* Training
* Blog
* About
You can’t perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refreshyour session.
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0