0.2.1 • Published 4 years ago

motif-utils v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

utils

utils.dateDiff

Kind: static property of utils

ParamTypeDescription
leftDateDate | Number | String원래 날짜
rightDateDate | Number | String비교할 날짜
unitString비교 단위

utils.dateFormat

Kind: static property of utils

ParamTypeDescription
dateDate | Number | String원래 날짜
formatString변환할 형식

Example

// Represent 11 February 2014 in middle-endian format:
var result = utils.dateFormat(new Date(2014, 1, 11), 'MM/dd/yyyy')
//=> '02/11/2014'

Example

// Represent 2 July 2014 in Esperanto:
import { eoLocale } from 'date-fns/locale/eo'
var result = utils.dateForma(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
  locale: eoLocale
})
//=> '2-a de julio 2014'

Example

// Escape string by single quote characters:
var result = utils.dateForma(new Date(2014, 6, 2, 15), "h 'o''clock'")
//=> "3 o'clock"

utils.dateISO

Kind: static property of utils

ParamTypeDescription
valueDate | Number | String시간 데이타

utils.decodeSpecialChars

Kind: static property of utils

ParamTypeDescription
stringString변환할 문자

utils.getBool

Kind: static property of utils

ParamTypeDescription
valueany임의 값

utils.getJSON

Kind: static property of utils

ParamTypeDescription
dataObjectJSON 객체

utils.is

Kind: static property of utils

ParamTypeDescription
valueAny
typeTypes체크할 타입

utils.paging

Kind: static property of utils

ParamType
paramsPagingParameters

utils.parseJSON

Kind: static property of utils

ParamType
jsonValueString
defaultValueObject

utils.timestamp

Kind: static property of utils

utils.uuid

Kind: static property of utils