when_you_free v1.4.29
when_you_free
Instructions:
npm install when_you_free
const when_you_free = require('when_you_free')
If utilizing in html...:
<script src="./node_modules/when_you_free/index.js"></script>
<script>
$(()=> {
const output = when_you_free.method(parameter)
})
</script>
Functions
isBefore() ⇒ boolean
Kind: global function
Date: 2022-03-06
Author: zen-out
Example
letTrue = when_you_free.isBefore("Dec 11, 2012", "Dec 12, 2012")
difference(one, two, seconds,) ⇒ integer
Kind: global function
Date: 2022-01-13
Author: zen-out
Param | Type | Description |
---|---|---|
one | date | |
two | date | |
seconds, | string | minutes, hours, weeks, months |
Example
let isTrue3 = when_you_free.difference("2020-03-01", "2021-02-01", "minutes")
isBetween(target, start, end) ⇒ boolean
Kind: global function
Date: 2022-03-07
Author: zen-out
Param | Type |
---|---|
target | date |
start | date |
end | date |
Example
let isTrue3 = when_you_free.isBetween("2020-03-01", "2021-03-01", "2022-02-01") // true
dateIsWithinLimit(getDate, limit) ⇒ boolean
Kind: global function
Date: 2022-03-10
Author: zen-out
Param | Type |
---|---|
getDate | date |
limit | number |
Example
if today is march 10
let getDays = when_you_free.dateIsWithinLimit("2022-01-01", 14) // return false
createDay(year, month, day) ⇒ any
Kind: global function
Date: 2022-03-20
Author: zen-out
Param | Type |
---|---|
year | any |
month | any |
day | any |
Example
let day = createDay(2022, 2, 2)
createFullDate(year, month, day, hour, minute, second) ⇒ date
Kind: global function
Date: 2022-03-07
Author: zen-out
Param | Type |
---|---|
year | number |
month | number |
day | number |
hour | number |
minute | number |
second | number |
Example
createFullDate(year, month, day, hour, minute, second)
getDuration(end, type) ⇒ string
Kind: global function
Date: 2022-03-07
Author: zen-out
Param | Type |
---|---|
end | date |
type | date |
Example
let getDuration = when_you_free.getDuration("2022-03-01T19:06:31.047Z", "2022-03-01T20:04:32.047Z", "seconds")
getReadableFormat(getDate, type) ⇒ string
Kind: global function
Date: 2022-01-13
Author: zen-out
Param | Type |
---|---|
getDate | any |
type | any |
Example
when_you_free.getReadableFormat("Dec 11, 2012", "from") in 2 months
when_you_free.getReadableFormat("Dec 11, 2012", "to") 2 months ago
format(date, type) ⇒ any
Kind: global function
Date: 2022-03-06
Author: zen-out
Param | Type |
---|---|
date | any |
type | any |
Example
let formatted1 = when_you_free.format("Dec 11, 1994", "ll")
digitalToSeconds(string) ⇒ any
Kind: global function
Date: 2022-03-07
Author: zen-out
Param | Type |
---|---|
string | any |
Example
let digitalOne = when_you_free.digitalToSeconds("11:22")
formatDateToPost(stringInput) ⇒ date
Kind: global function
Date: 2022-01-13
Author: zen-out
Param | Type |
---|---|
stringInput | any |
Example
when_you_free.formatDateToPost(stringInput)
formatToTimezone()
Kind: global function
Date: 2022-03-26
Author: zen-out
Example
let first = when_you_free.formatToTimezone("Asia/Hong_Kong", "Dec 11, 1994")
let second = when_you_free.formatToTimezone("America/New_York", "Dec 11, 1994")
let third = when_you_free.formatToTimezone("Europe/Copenhagen", "Dec 11, 1994")
let fifth = when_you_free.formatToTimezone("Europe/London", "Dec 11, 1994")
let seventh = formatToTimezone("Asia/Tokyo", "Dec 11, 1994")
let nine = formatToTimezone("Asia/Bangkok", "Dec 11, 1994")
getCurrentTime()
Kind: global function
Example
wyf.getCurrentTime("Asia/Hong_Kong").then((response) => {
console.log(response)
})
isDate()
Kind: global function
Author: github.com/zen-out
Example
let trueOrNot = when_you_free.isDate("1994-01-01")
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago