[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> date.js (summary)

(no description)

File Size: 1780 lines (817 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 65 functions

  packBase60Fraction()
  packBase60()
  packUntils()
  packAbbrsAndOffsets()
  packPopulation()
  packCountries()
  validatePackData()
  pack()
  packCountry()
  arraysAreEqual()
  zonesAreEqual()
  findAndCreateLinks()
  createLinks()
  findStartAndEndIndex()
  filterYears()
  filterLinkPack()
  charCodeToInt()
  unpackBase60()
  arrayToInt()
  intToUntil()
  mapIndices()
  unpack()
  Zone()
  Country()
  OffsetAt()
  ZoneScore()
  findChange()
  userOffsets()
  sortZoneScores()
  addToGuesses()
  guessesForUserOffsets()
  rebuildGuess()
  guess()
  normalizeName()
  addZone()
  getZone()
  getNames()
  getCountryNames()
  addLink()
  addCountries()
  getCountry()
  zonesForCountry()
  loadData()
  zoneExists()
  needsOffset()
  logError()
  tz()
  abbrWrap()
  resetZoneWrap()
  resetZoneWrap2()
  __webpack_require__()
  setSettings()
  getSettings()
  __experimentalGetSettings()
  setupWPTimezone()
  format()
  date()
  gmdate()
  dateI18n()
  gmdateI18n()
  isInTheFuture()
  getDate()
  humanTimeDiff()
  buildMoment()
  isUTCOffset()

Functions
Functions that are not part of a class:

packBase60Fraction(fraction, precision)   X-Ref
No description

packBase60(number, precision)   X-Ref
No description

packUntils(untils)   X-Ref
No description

packAbbrsAndOffsets(source)   X-Ref
No description

packPopulation(number)   X-Ref
No description

packCountries(countries)   X-Ref
No description

validatePackData(source)   X-Ref
No description

pack(source)   X-Ref
No description

packCountry(source)   X-Ref
No description

arraysAreEqual(a, b)   X-Ref
No description

zonesAreEqual(a, b)   X-Ref
No description

findAndCreateLinks(input, output, links, groupLeaders)   X-Ref
No description

createLinks(source, groupLeaders)   X-Ref
No description

findStartAndEndIndex(untils, start, end)   X-Ref
No description

filterYears(source, start, end)   X-Ref
No description

filterLinkPack(input, start, end, groupLeaders)   X-Ref
No description

charCodeToInt(charCode)   X-Ref
No description

unpackBase60(string)   X-Ref
No description

arrayToInt(array)   X-Ref
No description

intToUntil(array, length)   X-Ref
No description

mapIndices(source, indices)   X-Ref
No description

unpack(string)   X-Ref
No description

Zone(packedString)   X-Ref
No description

Country(country_name, zone_names)   X-Ref
No description

OffsetAt(at)   X-Ref
No description

ZoneScore(zone)   X-Ref
No description

findChange(low, high)   X-Ref
No description

userOffsets()   X-Ref
No description

sortZoneScores(a, b)   X-Ref
No description

addToGuesses(name, offsets)   X-Ref
No description

guessesForUserOffsets(offsets)   X-Ref
No description

rebuildGuess()   X-Ref
No description

guess(ignoreCache)   X-Ref
No description

normalizeName(name)   X-Ref
No description

addZone(packed)   X-Ref
No description

getZone(name, caller)   X-Ref
No description

getNames()   X-Ref
No description

getCountryNames()   X-Ref
No description

addLink(aliases)   X-Ref
No description

addCountries(data)   X-Ref
No description

getCountry(name)   X-Ref
No description

zonesForCountry(country, with_offset)   X-Ref
No description

loadData(data)   X-Ref
No description

zoneExists(name)   X-Ref
No description

needsOffset(m)   X-Ref
No description

logError(message)   X-Ref
No description

tz(input)   X-Ref
No description

abbrWrap(old)   X-Ref
No description

resetZoneWrap(old)   X-Ref
No description

resetZoneWrap2(old)   X-Ref
No description

__webpack_require__(moduleId)   X-Ref
No description

setSettings(dateSettings)   X-Ref
Adds a locale to moment, using the format supplied by `wp_localize_script()`.

param: {DateSettings} dateSettings Settings, including locale data.

getSettings()   X-Ref
Returns the currently defined date settings.

return: {DateSettings} Settings, including locale data.

__experimentalGetSettings()   X-Ref
Returns the currently defined date settings.

return: {DateSettings} Settings, including locale data.

setupWPTimezone()   X-Ref
No description

format(dateFormat, dateValue = new Date()   X-Ref
Formats a date. Does not alter the date's timezone.

param: {string}                             dateFormat PHP-style formatting string.
param: {Moment | Date | string | undefined} dateValue  Date object or string,
return: {string} Formatted date.

date(dateFormat, dateValue = new Date()   X-Ref
Formats a date (like `date()` in PHP).

param: {string}                             dateFormat PHP-style formatting string.
param: {Moment | Date | string | undefined} dateValue  Date object or string, parsable
param: {string | number | undefined}        timezone   Timezone to output result in or a
return: {string} Formatted date in English.

gmdate(dateFormat, dateValue = new Date()   X-Ref
Formats a date (like `date()` in PHP), in the UTC timezone.

param: {string}                             dateFormat PHP-style formatting string.
param: {Moment | Date | string | undefined} dateValue  Date object or string,
return: {string} Formatted date in English.

dateI18n(dateFormat, dateValue = new Date()   X-Ref
Formats a date (like `wp_date()` in PHP), translating it into site's locale.

Backward Compatibility Notice: if `timezone` is set to `true`, the function
behaves like `gmdateI18n`.

param: {string}                                dateFormat PHP-style formatting string.
param: {Moment | Date | string | undefined}    dateValue  Date object or string, parsable by
param: {string | number | boolean | undefined} timezone   Timezone to output result in or a
return: {string} Formatted date.

gmdateI18n(dateFormat, dateValue = new Date()   X-Ref
Formats a date (like `wp_date()` in PHP), translating it into site's locale
and using the UTC timezone.

param: {string}                             dateFormat PHP-style formatting string.
param: {Moment | Date | string | undefined} dateValue  Date object or string,
return: {string} Formatted date.

isInTheFuture(dateValue)   X-Ref
Check whether a date is considered in the future according to the WordPress settings.

param: {string} dateValue Date String or Date object in the Defined WP Timezone.
return: {boolean} Is in the future.

getDate(dateString)   X-Ref
Create and return a JavaScript Date Object from a date string in the WP timezone.

param: {string?} dateString Date formatted in the WP timezone.
return: {Date} Date

humanTimeDiff(from, to)   X-Ref
Returns a human-readable time difference between two dates, like human_time_diff() in PHP.

param: {Moment | Date | string}             from From date, in the WP timezone.
param: {Moment | Date | string | undefined} to   To date, formatted in the WP timezone.
return: {string} Human-readable time difference.

buildMoment(dateValue, timezone = '')   X-Ref
Creates a moment instance using the given timezone or, if none is provided, using global settings.

param: {Moment | Date | string | undefined} dateValue Date object or string, parsable
param: {string | number | undefined}        timezone  Timezone to output result in or a
return: {Moment} a moment instance.

isUTCOffset(offset)   X-Ref
Returns whether a certain UTC offset is valid or not.

param: {number|string} offset a UTC offset.
return: {boolean} whether a certain UTC offset is valid or not.



Generated : Sat Apr 20 08:20:01 2024 Cross-referenced by PHPXref