1.4.29 • Published 2 years ago

when_you_free v1.4.29

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

when_you_free

License: MIT NPM Downloads Play with docs

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

ParamTypeDescription
onedate
twodate
seconds,stringminutes, 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

ParamType
targetdate
startdate
enddate

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

ParamType
getDatedate
limitnumber

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

ParamType
yearany
monthany
dayany

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

ParamType
yearnumber
monthnumber
daynumber
hournumber
minutenumber
secondnumber

Example

createFullDate(year, month, day, hour, minute, second)

getDuration(end, type) ⇒ string

Kind: global function
Date: 2022-03-07
Author: zen-out

ParamType
enddate
typedate

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

ParamType
getDateany
typeany

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

ParamType
dateany
typeany

Example

let formatted1 = when_you_free.format("Dec 11, 1994", "ll")

digitalToSeconds(string) ⇒ any

Kind: global function
Date: 2022-03-07
Author: zen-out

ParamType
stringany

Example

let digitalOne = when_you_free.digitalToSeconds("11:22")

formatDateToPost(stringInput) ⇒ date

Kind: global function
Date: 2022-01-13
Author: zen-out

ParamType
stringInputany

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")
1.0.2

2 years ago

1.0.1

2 years ago

1.2.8

2 years ago

1.4.5

2 years ago

1.2.7

2 years ago

1.4.4

2 years ago

1.2.6

2 years ago

1.4.3

2 years ago

1.2.5

2 years ago

1.0.7

2 years ago

1.4.2

2 years ago

1.2.4

2 years ago

1.0.6

2 years ago

1.4.1

2 years ago

1.2.3

2 years ago

1.0.5

2 years ago

1.4.0

2 years ago

1.2.2

2 years ago

1.0.4

2 years ago

1.2.1

2 years ago

1.0.3

2 years ago

1.4.20

2 years ago

1.4.24

2 years ago

1.4.23

2 years ago

1.4.26

2 years ago

1.4.25

2 years ago

1.4.28

2 years ago

1.4.27

2 years ago

1.4.29

2 years ago

1.2.12

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.5

2 years ago

1.3.2

2 years ago

1.1.4

2 years ago

1.3.1

2 years ago

1.1.3

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

1.4.9

2 years ago

1.4.11

2 years ago

1.4.8

2 years ago

1.4.10

2 years ago

1.4.7

2 years ago

1.2.9

2 years ago

1.4.13

2 years ago

1.4.12

2 years ago

1.4.15

2 years ago

1.4.14

2 years ago

1.4.17

2 years ago

1.4.16

2 years ago

1.4.19

2 years ago

1.4.18

2 years ago

1.0.0

2 years ago