locutus 2.0.16 → 2.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_util/util.js +24 -24
- package/_util/util.js.map +1 -1
- package/c/math/abs.js.map +1 -1
- package/c/math/frexp.js.map +1 -1
- package/c/stdio/sprintf.js +1 -1
- package/c/stdio/sprintf.js.map +1 -1
- package/golang/strings/Contains.js.map +1 -1
- package/golang/strings/Count.js.map +1 -1
- package/golang/strings/Index2.js.map +1 -1
- package/golang/strings/LastIndex.js.map +1 -1
- package/package.json +65 -60
- package/php/_helpers/_bc.js +2 -3
- package/php/_helpers/_bc.js.map +1 -1
- package/php/_helpers/_phpCastString.js.map +1 -1
- package/php/_helpers/_php_cast_float.js +0 -1
- package/php/_helpers/_php_cast_float.js.map +1 -1
- package/php/_helpers/_php_cast_int.js +0 -1
- package/php/_helpers/_php_cast_int.js.map +1 -1
- package/php/array/array_change_key_case.js +0 -1
- package/php/array/array_change_key_case.js.map +1 -1
- package/php/array/array_chunk.js +6 -5
- package/php/array/array_chunk.js.map +1 -1
- package/php/array/array_column.js +1 -1
- package/php/array/array_column.js.map +1 -1
- package/php/array/array_combine.js +0 -1
- package/php/array/array_combine.js.map +1 -1
- package/php/array/array_count_values.js +0 -1
- package/php/array/array_count_values.js.map +1 -1
- package/php/array/array_diff.js +0 -2
- package/php/array/array_diff.js.map +1 -1
- package/php/array/array_diff_assoc.js +0 -2
- package/php/array/array_diff_assoc.js.map +1 -1
- package/php/array/array_diff_key.js +0 -2
- package/php/array/array_diff_key.js.map +1 -1
- package/php/array/array_diff_uassoc.js +0 -2
- package/php/array/array_diff_uassoc.js.map +1 -1
- package/php/array/array_diff_ukey.js +0 -2
- package/php/array/array_diff_ukey.js.map +1 -1
- package/php/array/array_fill.js +0 -1
- package/php/array/array_fill.js.map +1 -1
- package/php/array/array_fill_keys.js +0 -1
- package/php/array/array_fill_keys.js.map +1 -1
- package/php/array/array_filter.js +0 -1
- package/php/array/array_filter.js.map +1 -1
- package/php/array/array_flip.js +0 -1
- package/php/array/array_flip.js.map +1 -1
- package/php/array/array_intersect.js +0 -3
- package/php/array/array_intersect.js.map +1 -1
- package/php/array/array_intersect_assoc.js +0 -3
- package/php/array/array_intersect_assoc.js.map +1 -1
- package/php/array/array_intersect_key.js +0 -3
- package/php/array/array_intersect_key.js.map +1 -1
- package/php/array/array_intersect_uassoc.js +0 -3
- package/php/array/array_intersect_uassoc.js.map +1 -1
- package/php/array/array_intersect_ukey.js +0 -3
- package/php/array/array_intersect_ukey.js.map +1 -1
- package/php/array/array_key_exists.js +0 -1
- package/php/array/array_key_exists.js.map +1 -1
- package/php/array/array_keys.js +0 -1
- package/php/array/array_keys.js.map +1 -1
- package/php/array/array_map.js +0 -1
- package/php/array/array_map.js.map +1 -1
- package/php/array/array_merge.js +0 -1
- package/php/array/array_merge.js.map +1 -1
- package/php/array/array_merge_recursive.js +0 -1
- package/php/array/array_merge_recursive.js.map +1 -1
- package/php/array/array_multisort.js +0 -1
- package/php/array/array_multisort.js.map +1 -1
- package/php/array/array_pad.js +0 -1
- package/php/array/array_pad.js.map +1 -1
- package/php/array/array_pop.js +0 -1
- package/php/array/array_pop.js.map +1 -1
- package/php/array/array_product.js +0 -1
- package/php/array/array_product.js.map +1 -1
- package/php/array/array_push.js +0 -1
- package/php/array/array_push.js.map +1 -1
- package/php/array/array_rand.js +0 -1
- package/php/array/array_rand.js.map +1 -1
- package/php/array/array_reduce.js +0 -1
- package/php/array/array_reduce.js.map +1 -1
- package/php/array/array_replace.js +0 -1
- package/php/array/array_replace.js.map +1 -1
- package/php/array/array_replace_recursive.js +0 -1
- package/php/array/array_replace_recursive.js.map +1 -1
- package/php/array/array_reverse.js +0 -1
- package/php/array/array_reverse.js.map +1 -1
- package/php/array/array_search.js +1 -2
- package/php/array/array_search.js.map +1 -1
- package/php/array/array_shift.js +0 -1
- package/php/array/array_shift.js.map +1 -1
- package/php/array/array_slice.js +2 -2
- package/php/array/array_slice.js.map +1 -1
- package/php/array/array_splice.js +0 -1
- package/php/array/array_splice.js.map +1 -1
- package/php/array/array_sum.js +0 -1
- package/php/array/array_sum.js.map +1 -1
- package/php/array/array_udiff.js +0 -3
- package/php/array/array_udiff.js.map +1 -1
- package/php/array/array_udiff_assoc.js +0 -2
- package/php/array/array_udiff_assoc.js.map +1 -1
- package/php/array/array_udiff_uassoc.js +0 -2
- package/php/array/array_udiff_uassoc.js.map +1 -1
- package/php/array/array_uintersect.js +0 -3
- package/php/array/array_uintersect.js.map +1 -1
- package/php/array/array_uintersect_uassoc.js +0 -3
- package/php/array/array_uintersect_uassoc.js.map +1 -1
- package/php/array/array_unique.js +0 -1
- package/php/array/array_unique.js.map +1 -1
- package/php/array/array_unshift.js +0 -1
- package/php/array/array_unshift.js.map +1 -1
- package/php/array/array_values.js +0 -1
- package/php/array/array_values.js.map +1 -1
- package/php/array/array_walk.js +0 -1
- package/php/array/array_walk.js.map +1 -1
- package/php/array/array_walk_recursive.js +0 -1
- package/php/array/array_walk_recursive.js.map +1 -1
- package/php/array/arsort.js.map +1 -1
- package/php/array/asort.js.map +1 -1
- package/php/array/count.js.map +1 -1
- package/php/array/current.js.map +1 -1
- package/php/array/each.js.map +1 -1
- package/php/array/end.js.map +1 -1
- package/php/array/in_array.js +1 -2
- package/php/array/in_array.js.map +1 -1
- package/php/array/key.js.map +1 -1
- package/php/array/krsort.js.map +1 -1
- package/php/array/ksort.js.map +1 -1
- package/php/array/natcasesort.js.map +1 -1
- package/php/array/natsort.js.map +1 -1
- package/php/array/next.js.map +1 -1
- package/php/array/pos.js.map +1 -1
- package/php/array/prev.js.map +1 -1
- package/php/array/range.js.map +1 -1
- package/php/array/reset.js.map +1 -1
- package/php/array/rsort.js.map +1 -1
- package/php/array/shuffle.js.map +1 -1
- package/php/array/sizeof.js.map +1 -1
- package/php/array/sort.js.map +1 -1
- package/php/array/uasort.js.map +1 -1
- package/php/array/uksort.js.map +1 -1
- package/php/array/usort.js.map +1 -1
- package/php/bc/bcadd.js.map +1 -1
- package/php/bc/bccomp.js.map +1 -1
- package/php/bc/bcdiv.js.map +1 -1
- package/php/bc/bcmul.js.map +1 -1
- package/php/bc/bcround.js.map +1 -1
- package/php/bc/bcscale.js.map +1 -1
- package/php/bc/bcsub.js.map +1 -1
- package/php/ctype/ctype_alnum.js +0 -1
- package/php/ctype/ctype_alnum.js.map +1 -1
- package/php/ctype/ctype_alpha.js +0 -1
- package/php/ctype/ctype_alpha.js.map +1 -1
- package/php/ctype/ctype_cntrl.js +0 -1
- package/php/ctype/ctype_cntrl.js.map +1 -1
- package/php/ctype/ctype_digit.js +0 -1
- package/php/ctype/ctype_digit.js.map +1 -1
- package/php/ctype/ctype_graph.js +0 -1
- package/php/ctype/ctype_graph.js.map +1 -1
- package/php/ctype/ctype_lower.js +0 -1
- package/php/ctype/ctype_lower.js.map +1 -1
- package/php/ctype/ctype_print.js +0 -1
- package/php/ctype/ctype_print.js.map +1 -1
- package/php/ctype/ctype_punct.js +0 -1
- package/php/ctype/ctype_punct.js.map +1 -1
- package/php/ctype/ctype_space.js +0 -1
- package/php/ctype/ctype_space.js.map +1 -1
- package/php/ctype/ctype_upper.js +0 -1
- package/php/ctype/ctype_upper.js.map +1 -1
- package/php/ctype/ctype_xdigit.js +0 -1
- package/php/ctype/ctype_xdigit.js.map +1 -1
- package/php/datetime/checkdate.js.map +1 -1
- package/php/datetime/date.js +1 -2
- package/php/datetime/date.js.map +1 -1
- package/php/datetime/date_parse.js +0 -1
- package/php/datetime/date_parse.js.map +1 -1
- package/php/datetime/getdate.js +1 -2
- package/php/datetime/getdate.js.map +1 -1
- package/php/datetime/gettimeofday.js.map +1 -1
- package/php/datetime/gmdate.js.map +1 -1
- package/php/datetime/gmmktime.js.map +1 -1
- package/php/datetime/gmstrftime.js.map +1 -1
- package/php/datetime/idate.js.map +1 -1
- package/php/datetime/microtime.js.map +1 -1
- package/php/datetime/mktime.js.map +1 -1
- package/php/datetime/strftime.js.map +1 -1
- package/php/datetime/strptime.js.map +1 -1
- package/php/datetime/strtotime.js +28 -14
- package/php/datetime/strtotime.js.map +1 -1
- package/php/datetime/time.js.map +1 -1
- package/php/exec/escapeshellarg.js +1 -1
- package/php/exec/escapeshellarg.js.map +1 -1
- package/php/filesystem/basename.js.map +1 -1
- package/php/filesystem/dirname.js.map +1 -1
- package/php/filesystem/file_get_contents.js +0 -1
- package/php/filesystem/file_get_contents.js.map +1 -1
- package/php/filesystem/pathinfo.js.map +1 -1
- package/php/filesystem/realpath.js.map +1 -1
- package/php/funchand/call_user_func.js +0 -1
- package/php/funchand/call_user_func.js.map +1 -1
- package/php/funchand/call_user_func_array.js +0 -1
- package/php/funchand/call_user_func_array.js.map +1 -1
- package/php/funchand/create_function.js +0 -1
- package/php/funchand/create_function.js.map +1 -1
- package/php/funchand/function_exists.js +0 -1
- package/php/funchand/function_exists.js.map +1 -1
- package/php/funchand/get_defined_functions.js +0 -1
- package/php/funchand/get_defined_functions.js.map +1 -1
- package/php/i18n/i18n_loc_get_default.js +0 -1
- package/php/i18n/i18n_loc_get_default.js.map +1 -1
- package/php/i18n/i18n_loc_set_default.js +0 -1
- package/php/i18n/i18n_loc_set_default.js.map +1 -1
- package/php/info/assert_options.js +0 -1
- package/php/info/assert_options.js.map +1 -1
- package/php/info/getenv.js.map +1 -1
- package/php/info/ini_get.js +0 -1
- package/php/info/ini_get.js.map +1 -1
- package/php/info/ini_set.js +0 -1
- package/php/info/ini_set.js.map +1 -1
- package/php/info/set_time_limit.js +0 -1
- package/php/info/set_time_limit.js.map +1 -1
- package/php/info/version_compare.js +0 -1
- package/php/info/version_compare.js.map +1 -1
- package/php/json/json_decode.js +0 -1
- package/php/json/json_decode.js.map +1 -1
- package/php/json/json_encode.js +0 -1
- package/php/json/json_encode.js.map +1 -1
- package/php/json/json_last_error.js +0 -1
- package/php/json/json_last_error.js.map +1 -1
- package/php/math/abs.js.map +1 -1
- package/php/math/acos.js.map +1 -1
- package/php/math/acosh.js.map +1 -1
- package/php/math/asin.js.map +1 -1
- package/php/math/asinh.js.map +1 -1
- package/php/math/atan.js.map +1 -1
- package/php/math/atan2.js.map +1 -1
- package/php/math/atanh.js.map +1 -1
- package/php/math/base_convert.js +0 -1
- package/php/math/base_convert.js.map +1 -1
- package/php/math/bindec.js.map +1 -1
- package/php/math/ceil.js.map +1 -1
- package/php/math/cos.js.map +1 -1
- package/php/math/cosh.js.map +1 -1
- package/php/math/decbin.js +1 -1
- package/php/math/decbin.js.map +1 -1
- package/php/math/dechex.js +1 -1
- package/php/math/dechex.js.map +1 -1
- package/php/math/decoct.js +1 -1
- package/php/math/decoct.js.map +1 -1
- package/php/math/deg2rad.js.map +1 -1
- package/php/math/exp.js.map +1 -1
- package/php/math/expm1.js.map +1 -1
- package/php/math/floor.js.map +1 -1
- package/php/math/fmod.js.map +1 -1
- package/php/math/getrandmax.js.map +1 -1
- package/php/math/hexdec.js.map +1 -1
- package/php/math/hypot.js.map +1 -1
- package/php/math/is_finite.js +0 -1
- package/php/math/is_finite.js.map +1 -1
- package/php/math/is_infinite.js +0 -1
- package/php/math/is_infinite.js.map +1 -1
- package/php/math/is_nan.js +0 -1
- package/php/math/is_nan.js.map +1 -1
- package/php/math/lcg_value.js +0 -1
- package/php/math/lcg_value.js.map +1 -1
- package/php/math/log.js.map +1 -1
- package/php/math/log10.js.map +1 -1
- package/php/math/log1p.js.map +1 -1
- package/php/math/max.js.map +1 -1
- package/php/math/min.js.map +1 -1
- package/php/math/mt_getrandmax.js +0 -1
- package/php/math/mt_getrandmax.js.map +1 -1
- package/php/math/mt_rand.js +0 -1
- package/php/math/mt_rand.js.map +1 -1
- package/php/math/octdec.js.map +1 -1
- package/php/math/pi.js.map +1 -1
- package/php/math/pow.js.map +1 -1
- package/php/math/rad2deg.js.map +1 -1
- package/php/math/rand.js.map +1 -1
- package/php/math/round.js.map +1 -1
- package/php/math/sin.js.map +1 -1
- package/php/math/sinh.js.map +1 -1
- package/php/math/sqrt.js.map +1 -1
- package/php/math/tan.js.map +1 -1
- package/php/math/tanh.js.map +1 -1
- package/php/misc/pack.js +15 -15
- package/php/misc/pack.js.map +1 -1
- package/php/misc/uniqid.js.map +1 -1
- package/php/net-gopher/gopher_parsedir.js +0 -1
- package/php/net-gopher/gopher_parsedir.js.map +1 -1
- package/php/network/inet_ntop.js +0 -1
- package/php/network/inet_ntop.js.map +1 -1
- package/php/network/inet_pton.js +1 -2
- package/php/network/inet_pton.js.map +1 -1
- package/php/network/ip2long.js.map +1 -1
- package/php/network/long2ip.js +1 -1
- package/php/network/long2ip.js.map +1 -1
- package/php/network/setcookie.js.map +1 -1
- package/php/network/setrawcookie.js.map +1 -1
- package/php/pcre/preg_match.js +0 -1
- package/php/pcre/preg_match.js.map +1 -1
- package/php/pcre/preg_quote.js +0 -1
- package/php/pcre/preg_quote.js.map +1 -1
- package/php/pcre/preg_replace.js +0 -1
- package/php/pcre/preg_replace.js.map +1 -1
- package/php/pcre/sql_regcase.js +0 -1
- package/php/pcre/sql_regcase.js.map +1 -1
- package/php/strings/addcslashes.js.map +1 -1
- package/php/strings/addslashes.js.map +1 -1
- package/php/strings/bin2hex.js.map +1 -1
- package/php/strings/chop.js.map +1 -1
- package/php/strings/chr.js +2 -2
- package/php/strings/chr.js.map +1 -1
- package/php/strings/chunk_split.js +0 -1
- package/php/strings/chunk_split.js.map +1 -1
- package/php/strings/convert_cyr_string.js +0 -1
- package/php/strings/convert_cyr_string.js.map +1 -1
- package/php/strings/convert_uuencode.js +0 -1
- package/php/strings/convert_uuencode.js.map +1 -1
- package/php/strings/count_chars.js +0 -1
- package/php/strings/count_chars.js.map +1 -1
- package/php/strings/crc32.js +1 -1
- package/php/strings/crc32.js.map +1 -1
- package/php/strings/echo.js.map +1 -1
- package/php/strings/explode.js.map +1 -1
- package/php/strings/get_html_translation_table.js +0 -1
- package/php/strings/get_html_translation_table.js.map +1 -1
- package/php/strings/hex2bin.js.map +1 -1
- package/php/strings/html_entity_decode.js +0 -1
- package/php/strings/html_entity_decode.js.map +1 -1
- package/php/strings/htmlentities.js.map +1 -1
- package/php/strings/htmlspecialchars.js.map +1 -1
- package/php/strings/htmlspecialchars_decode.js +0 -1
- package/php/strings/htmlspecialchars_decode.js.map +1 -1
- package/php/strings/implode.js.map +1 -1
- package/php/strings/join.js.map +1 -1
- package/php/strings/lcfirst.js.map +1 -1
- package/php/strings/levenshtein.js.map +1 -1
- package/php/strings/localeconv.js.map +1 -1
- package/php/strings/ltrim.js.map +1 -1
- package/php/strings/md5.js +67 -67
- package/php/strings/md5.js.map +1 -1
- package/php/strings/md5_file.js +0 -1
- package/php/strings/md5_file.js.map +1 -1
- package/php/strings/metaphone.js +1 -1
- package/php/strings/metaphone.js.map +1 -1
- package/php/strings/money_format.js +0 -1
- package/php/strings/money_format.js.map +1 -1
- package/php/strings/nl2br.js.map +1 -1
- package/php/strings/nl_langinfo.js +0 -1
- package/php/strings/nl_langinfo.js.map +1 -1
- package/php/strings/number_format.js +0 -1
- package/php/strings/number_format.js.map +1 -1
- package/php/strings/ord.js +3 -3
- package/php/strings/ord.js.map +1 -1
- package/php/strings/parse_str.js +0 -1
- package/php/strings/parse_str.js.map +1 -1
- package/php/strings/printf.js.map +1 -1
- package/php/strings/quoted_printable_decode.js +0 -1
- package/php/strings/quoted_printable_decode.js.map +1 -1
- package/php/strings/quoted_printable_encode.js +0 -1
- package/php/strings/quoted_printable_encode.js.map +1 -1
- package/php/strings/quotemeta.js.map +1 -1
- package/php/strings/rtrim.js.map +1 -1
- package/php/strings/setlocale.js.map +1 -1
- package/php/strings/sha1.js +7 -7
- package/php/strings/sha1.js.map +1 -1
- package/php/strings/sha1_file.js +0 -1
- package/php/strings/sha1_file.js.map +1 -1
- package/php/strings/similar_text.js +1 -2
- package/php/strings/similar_text.js.map +1 -1
- package/php/strings/soundex.js.map +1 -1
- package/php/strings/split.js.map +1 -1
- package/php/strings/sprintf.js.map +1 -1
- package/php/strings/sscanf.js.map +1 -1
- package/php/strings/str_getcsv.js +0 -1
- package/php/strings/str_getcsv.js.map +1 -1
- package/php/strings/str_ireplace.js +0 -1
- package/php/strings/str_ireplace.js.map +1 -1
- package/php/strings/str_pad.js +0 -1
- package/php/strings/str_pad.js.map +1 -1
- package/php/strings/str_repeat.js +0 -1
- package/php/strings/str_repeat.js.map +1 -1
- package/php/strings/str_replace.js +0 -1
- package/php/strings/str_replace.js.map +1 -1
- package/php/strings/str_rot13.js +0 -1
- package/php/strings/str_rot13.js.map +1 -1
- package/php/strings/str_shuffle.js +0 -1
- package/php/strings/str_shuffle.js.map +1 -1
- package/php/strings/str_split.js +0 -1
- package/php/strings/str_split.js.map +1 -1
- package/php/strings/str_word_count.js +4 -5
- package/php/strings/str_word_count.js.map +1 -1
- package/php/strings/strcasecmp.js.map +1 -1
- package/php/strings/strchr.js.map +1 -1
- package/php/strings/strcmp.js.map +1 -1
- package/php/strings/strcoll.js.map +1 -1
- package/php/strings/strcspn.js.map +1 -1
- package/php/strings/strip_tags.js +0 -1
- package/php/strings/strip_tags.js.map +1 -1
- package/php/strings/stripos.js.map +1 -1
- package/php/strings/stripslashes.js.map +1 -1
- package/php/strings/stristr.js.map +1 -1
- package/php/strings/strlen.js +4 -4
- package/php/strings/strlen.js.map +1 -1
- package/php/strings/strnatcasecmp.js.map +1 -1
- package/php/strings/strnatcmp.js.map +1 -1
- package/php/strings/strncasecmp.js.map +1 -1
- package/php/strings/strncmp.js.map +1 -1
- package/php/strings/strpbrk.js.map +1 -1
- package/php/strings/strpos.js.map +1 -1
- package/php/strings/strrchr.js.map +1 -1
- package/php/strings/strrev.js.map +1 -1
- package/php/strings/strripos.js.map +1 -1
- package/php/strings/strrpos.js.map +1 -1
- package/php/strings/strspn.js.map +1 -1
- package/php/strings/strstr.js.map +1 -1
- package/php/strings/strtok.js.map +1 -1
- package/php/strings/strtolower.js.map +1 -1
- package/php/strings/strtoupper.js.map +1 -1
- package/php/strings/strtr.js.map +1 -1
- package/php/strings/substr.js.map +1 -1
- package/php/strings/substr_compare.js +0 -1
- package/php/strings/substr_compare.js.map +1 -1
- package/php/strings/substr_count.js +0 -1
- package/php/strings/substr_count.js.map +1 -1
- package/php/strings/substr_replace.js +0 -1
- package/php/strings/substr_replace.js.map +1 -1
- package/php/strings/trim.js.map +1 -1
- package/php/strings/ucfirst.js.map +1 -1
- package/php/strings/ucwords.js.map +1 -1
- package/php/strings/vprintf.js.map +1 -1
- package/php/strings/vsprintf.js.map +1 -1
- package/php/strings/wordwrap.js.map +1 -1
- package/php/url/base64_decode.js +0 -1
- package/php/url/base64_decode.js.map +1 -1
- package/php/url/base64_encode.js +0 -1
- package/php/url/base64_encode.js.map +1 -1
- package/php/url/http_build_query.js +0 -1
- package/php/url/http_build_query.js.map +1 -1
- package/php/url/parse_url.js +0 -1
- package/php/url/parse_url.js.map +1 -1
- package/php/url/rawurldecode.js.map +1 -1
- package/php/url/rawurlencode.js.map +1 -1
- package/php/url/urldecode.js.map +1 -1
- package/php/url/urlencode.js.map +1 -1
- package/php/var/boolval.js.map +1 -1
- package/php/var/doubleval.js.map +1 -1
- package/php/var/empty.js.map +1 -1
- package/php/var/floatval.js.map +1 -1
- package/php/var/gettype.js.map +1 -1
- package/php/var/intval.js.map +1 -1
- package/php/var/is_array.js +0 -1
- package/php/var/is_array.js.map +1 -1
- package/php/var/is_binary.js +0 -1
- package/php/var/is_binary.js.map +1 -1
- package/php/var/is_bool.js +0 -1
- package/php/var/is_bool.js.map +1 -1
- package/php/var/is_buffer.js +0 -1
- package/php/var/is_buffer.js.map +1 -1
- package/php/var/is_callable.js +1 -2
- package/php/var/is_callable.js.map +1 -1
- package/php/var/is_double.js +0 -1
- package/php/var/is_double.js.map +1 -1
- package/php/var/is_float.js +0 -1
- package/php/var/is_float.js.map +1 -1
- package/php/var/is_int.js +0 -1
- package/php/var/is_int.js.map +1 -1
- package/php/var/is_integer.js +0 -1
- package/php/var/is_integer.js.map +1 -1
- package/php/var/is_long.js +0 -1
- package/php/var/is_long.js.map +1 -1
- package/php/var/is_null.js +0 -1
- package/php/var/is_null.js.map +1 -1
- package/php/var/is_numeric.js +0 -1
- package/php/var/is_numeric.js.map +1 -1
- package/php/var/is_object.js +0 -1
- package/php/var/is_object.js.map +1 -1
- package/php/var/is_real.js +0 -1
- package/php/var/is_real.js.map +1 -1
- package/php/var/is_scalar.js +0 -1
- package/php/var/is_scalar.js.map +1 -1
- package/php/var/is_string.js +0 -1
- package/php/var/is_string.js.map +1 -1
- package/php/var/is_unicode.js +0 -1
- package/php/var/is_unicode.js.map +1 -1
- package/php/var/isset.js.map +1 -1
- package/php/var/print_r.js +0 -1
- package/php/var/print_r.js.map +1 -1
- package/php/var/serialize.js.map +1 -1
- package/php/var/strval.js.map +1 -1
- package/php/var/unserialize.js +12 -16
- package/php/var/unserialize.js.map +1 -1
- package/php/var/var_dump.js +0 -1
- package/php/var/var_dump.js.map +1 -1
- package/php/var/var_export.js +0 -1
- package/php/var/var_export.js.map +1 -1
- package/php/xdiff/xdiff_string_diff.js +0 -1
- package/php/xdiff/xdiff_string_diff.js.map +1 -1
- package/php/xdiff/xdiff_string_patch.js +0 -1
- package/php/xdiff/xdiff_string_patch.js.map +1 -1
- package/php/xml/utf8_decode.js +10 -11
- package/php/xml/utf8_decode.js.map +1 -1
- package/php/xml/utf8_encode.js +4 -5
- package/php/xml/utf8_encode.js.map +1 -1
- package/python/string/ascii_letters.js +0 -1
- package/python/string/ascii_letters.js.map +1 -1
- package/python/string/ascii_lowercase.js +0 -1
- package/python/string/ascii_lowercase.js.map +1 -1
- package/python/string/ascii_uppercase.js +0 -1
- package/python/string/ascii_uppercase.js.map +1 -1
- package/python/string/capwords.js.map +1 -1
- package/python/string/index.js +1 -0
- package/python/string/index.js.map +1 -1
- package/python/string/punctuation.js +2 -2
- package/python/string/punctuation.js.map +1 -1
- package/ruby/Math/acos.js.map +1 -1
- package/php/_locutus_shared/_locutus_shared_bc.js +0 -1255
- package/php/_locutus_shared/_locutus_shared_bc.js.map +0 -1
- package/php/_locutus_shared/index.js +0 -4
- package/php/_locutus_shared/index.js.map +0 -1
package/php/ctype/ctype_alnum.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_alnum.js"],"names":["module","exports","ctype_alnum","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","an"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_alnum.js"],"names":["module","exports","ctype_alnum","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","an"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_alnum.js","sourcesContent":["module.exports = function ctype_alnum(text) {\n // discuss at: https://locutus.io/php/ctype_alnum/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_alnum('AbC12')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.an) !== -1\n}\n"]}
|
package/php/ctype/ctype_alpha.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_alpha.js"],"names":["module","exports","ctype_alpha","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","al"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_alpha.js"],"names":["module","exports","ctype_alpha","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","al"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_alpha.js","sourcesContent":["module.exports = function ctype_alpha(text) {\n // discuss at: https://locutus.io/php/ctype_alpha/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_alpha('Az')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.al) !== -1\n}\n"]}
|
package/php/ctype/ctype_cntrl.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_cntrl.js"],"names":["module","exports","ctype_cntrl","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","ct"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_cntrl.js"],"names":["module","exports","ctype_cntrl","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","ct"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CArBD","file":"ctype_cntrl.js","sourcesContent":["module.exports = function ctype_cntrl(text) {\n // discuss at: https://locutus.io/php/ctype_cntrl/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_cntrl('\\u0020')\n // returns 1: false\n // example 2: ctype_cntrl('\\u001F')\n // returns 2: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.ct) !== -1\n}\n"]}
|
package/php/ctype/ctype_digit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_digit.js"],"names":["module","exports","ctype_digit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","dg"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_digit.js"],"names":["module","exports","ctype_digit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","dg"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_digit.js","sourcesContent":["module.exports = function ctype_digit(text) {\n // discuss at: https://locutus.io/php/ctype_digit/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_digit('150')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.dg) !== -1\n}\n"]}
|
package/php/ctype/ctype_graph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_graph.js"],"names":["module","exports","ctype_graph","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","gr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_graph.js"],"names":["module","exports","ctype_graph","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","gr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CArBD","file":"ctype_graph.js","sourcesContent":["module.exports = function ctype_graph(text) {\n // discuss at: https://locutus.io/php/ctype_graph/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_graph('!%')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.gr) !== -1\n}\n"]}
|
package/php/ctype/ctype_lower.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_lower.js"],"names":["module","exports","ctype_lower","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","lw"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_lower.js"],"names":["module","exports","ctype_lower","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","lw"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;;AAED;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_lower.js","sourcesContent":["module.exports = function ctype_lower(text) {\n // discuss at: https://locutus.io/php/ctype_lower/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_lower('abc')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.lw) !== -1\n}\n"]}
|
package/php/ctype/ctype_print.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_print.js"],"names":["module","exports","ctype_print","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_print.js"],"names":["module","exports","ctype_print","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_print.js","sourcesContent":["module.exports = function ctype_print(text) {\n // discuss at: https://locutus.io/php/ctype_print/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_print('AbC!#12')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pr) !== -1\n}\n"]}
|
package/php/ctype/ctype_punct.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_punct.js"],"names":["module","exports","ctype_punct","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pu"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_punct.js"],"names":["module","exports","ctype_punct","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","pu"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_punct.js","sourcesContent":["module.exports = function ctype_punct(text) {\n // discuss at: https://locutus.io/php/ctype_punct/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_punct('!?')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.pu) !== -1\n}\n"]}
|
package/php/ctype/ctype_space.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_space.js"],"names":["module","exports","ctype_space","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","sp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_space.js"],"names":["module","exports","ctype_space","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","sp"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;AACA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CAnBD","file":"ctype_space.js","sourcesContent":["module.exports = function ctype_space(text) {\n // discuss at: https://locutus.io/php/ctype_space/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_space('\\t\\n')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.sp) !== -1\n}\n"]}
|
package/php/ctype/ctype_upper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_upper.js"],"names":["module","exports","ctype_upper","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","up"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_upper.js"],"names":["module","exports","ctype_upper","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","up"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AAC1C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_upper.js","sourcesContent":["module.exports = function ctype_upper(text) {\n // discuss at: https://locutus.io/php/ctype_upper/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_upper('AZ')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.up) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/ctype/ctype_xdigit.js"],"names":["module","exports","ctype_xdigit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","xd"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/ctype/ctype_xdigit.js"],"names":["module","exports","ctype_xdigit","text","setlocale","require","$global","window","global","$locutus","p","php","search","locales","localeCategories","LC_CTYPE","xd"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,IAAtB,EAA4B;AAC3C;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,sBAAR,CAAlB;;AAEA,MAAI,OAAOF,IAAP,KAAgB,QAApB,EAA8B;AAC5B,WAAO,KAAP;AACD;AACD;AACAC,YAAU,QAAV,EAAoB,CAApB;;AAEA,MAAME,UAAU,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;AACAF,UAAQG,QAAR,GAAmBH,QAAQG,QAAR,IAAoB,EAAvC;AACA,MAAMA,WAAWH,QAAQG,QAAzB;AACA,MAAMC,IAAID,SAASE,GAAnB;;AAEA,SAAOR,KAAKS,MAAL,CAAYF,EAAEG,OAAF,CAAUH,EAAEI,gBAAF,CAAmBC,QAA7B,EAAuCA,QAAvC,CAAgDC,EAA5D,MAAoE,CAAC,CAA5E;AACD,CApBD","file":"ctype_xdigit.js","sourcesContent":["module.exports = function ctype_xdigit(text) {\n // discuss at: https://locutus.io/php/ctype_xdigit/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: ctype_xdigit('01dF')\n // returns 1: true\n\n const setlocale = require('../strings/setlocale')\n\n if (typeof text !== 'string') {\n return false\n }\n // ensure setup of localization variables takes place\n setlocale('LC_ALL', 0)\n\n const $global = typeof window !== 'undefined' ? window : global\n $global.$locutus = $global.$locutus || {}\n const $locutus = $global.$locutus\n const p = $locutus.php\n\n return text.search(p.locales[p.localeCategories.LC_CTYPE].LC_CTYPE.xd) !== -1\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/checkdate.js"],"names":["module","exports","checkdate","m","d","y","Date","getDate"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/checkdate.js"],"names":["module","exports","checkdate","m","d","y","Date","getDate"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAOF,IAAI,CAAJ,IAASA,IAAI,EAAb,IAAmBE,IAAI,CAAvB,IAA4BA,IAAI,KAAhC,IAAyCD,IAAI,CAA7C,IAAkDA,KAAK,IAAIE,IAAJ,CAASD,CAAT,EAAYF,CAAZ,EAAe,CAAf,EAAkBI,OAAlB,EAA9D;AACD,CAfD","file":"checkdate.js","sourcesContent":["module.exports = function checkdate(m, d, y) {\n // discuss at: https://locutus.io/php/checkdate/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // improved by: Pyerre\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: checkdate(12, 31, 2000)\n // returns 1: true\n // example 2: checkdate(2, 29, 2001)\n // returns 2: false\n // example 3: checkdate(3, 31, 2008)\n // returns 3: true\n // example 4: checkdate(1, 390, 2000)\n // returns 4: false\n\n return m > 0 && m < 13 && y > 0 && y < 32768 && d > 0 && d <= new Date(y, m, 0).getDate()\n}\n"]}
|
package/php/datetime/date.js
CHANGED
|
@@ -309,8 +309,7 @@ module.exports = function date(format, timestamp) {
|
|
|
309
309
|
var _date = function _date(format, timestamp) {
|
|
310
310
|
jsdate = timestamp === undefined ? new Date() // Not provided
|
|
311
311
|
: timestamp instanceof Date ? new Date(timestamp) // JS Date()
|
|
312
|
-
: new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
|
|
313
|
-
;
|
|
312
|
+
: new Date(timestamp * 1000); // UNIX timestamp (auto-convert to int)
|
|
314
313
|
return format.replace(formatChr, formatChrCb);
|
|
315
314
|
};
|
|
316
315
|
|
package/php/datetime/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/date.js"],"names":["module","exports","date","format","timestamp","jsdate","f","txtWords","formatChr","formatChrCb","t","s","_pad","n","c","String","length","d","j","D","l","slice","getDate","w","N","S","i","parseInt","getDay","z","a","Date","Y","b","Math","round","W","getFullYear","F","m","M","getMonth","L","o","y","toString","getHours","A","toUpperCase","B","H","getUTCHours","getUTCMinutes","getUTCSeconds","floor","g","G","h","getMinutes","getSeconds","u","getMilliseconds","e","msg","Error","I","UTC","O","tzo","getTimezoneOffset","abs","P","substr","T","Z","replace","r","U","_date","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAeC,MAAf,EAAuBC,SAAvB,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,eAAJ;AAAA,MAAYC,UAAZ;AACA;AACA;AACA,MAAMC,WAAW,CACf,KADe,EACR,KADQ,EACD,MADC,EACO,QADP,EACiB,OADjB,EAC0B,KAD1B,EACiC,OADjC,EAEf,SAFe,EAEJ,UAFI,EAEQ,OAFR,EAEiB,OAFjB,EAE0B,KAF1B,EAEiC,MAFjC,EAGf,MAHe,EAGP,QAHO,EAGG,WAHH,EAGgB,SAHhB,EAG2B,UAH3B,EAGuC,UAHvC,CAAjB;AAKA;AACA;AACA;AACA,MAAMC,YAAY,WAAlB;AACA,MAAMC,cAAc,SAAdA,WAAc,CAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClC,WAAOL,EAAEI,CAAF,IAAOJ,EAAEI,CAAF,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AAP;AACD,GARD;;AAUA,SAAOqE,MAAM3E,MAAN,EAAcC,SAAd,CAAP;AACD,CAtUD","file":"date.js","sourcesContent":["module.exports = function date (format, timestamp) {\n // discuss at: https://locutus.io/php/date/\n // original by: Carlos R. L. Rodrigues (https://www.jsfromhell.com)\n // original by: gettimeofday\n // parts by: Peter-Paul Koch (https://www.quirksmode.org/js/beat.html)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: MeEtc (https://yass.meetcweb.com)\n // improved by: Brad Touesnard\n // improved by: Tim Wiel\n // improved by: Bryan Elliott\n // improved by: David Randall\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Thomas Beaucourt (https://www.webapp.fr)\n // improved by: JT\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Rafał Kukawski (https://blog.kukawski.pl)\n // improved by: Theriault (https://github.com/Theriault)\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: majak\n // input by: Alex\n // input by: Martin\n // input by: Alex Wilson\n // input by: Haravikk\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: majak\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: omid (https://locutus.io/php/380:380#comment_137122)\n // bugfixed by: Chris (https://www.devotis.nl/)\n // note 1: Uses global: locutus to store the default timezone\n // note 1: Although the function potentially allows timezone info\n // note 1: (see notes), it currently does not set\n // note 1: per a timezone specified by date_default_timezone_set(). Implementers might use\n // note 1: $locutus.currentTimezoneOffset and\n // note 1: $locutus.currentTimezoneDST set by that function\n // note 1: in order to adjust the dates in this function\n // note 1: (or our other date functions!) accordingly\n // example 1: date('H:m:s \\\\m \\\\i\\\\s \\\\m\\\\o\\\\n\\\\t\\\\h', 1062402400)\n // returns 1: '07:09:40 m is month'\n // example 2: date('F j, Y, g:i a', 1062462400)\n // returns 2: 'September 2, 2003, 12:26 am'\n // example 3: date('Y W o', 1062462400)\n // returns 3: '2003 36 2003'\n // example 4: var $x = date('Y m d', (new Date()).getTime() / 1000)\n // example 4: $x = $x + ''\n // example 4: var $result = $x.length // 2009 01 09\n // returns 4: 10\n // example 5: date('W', 1104534000)\n // returns 5: '52'\n // example 6: date('B t', 1104534000)\n // returns 6: '999 31'\n // example 7: date('W U', 1293750000.82); // 2010-12-31\n // returns 7: '52 1293750000'\n // example 8: date('W', 1293836400); // 2011-01-01\n // returns 8: '52'\n // example 9: date('W Y-m-d', 1293974054); // 2011-01-02\n // returns 9: '52 2011-01-02'\n // test: skip-1 skip-2 skip-5\n\n let jsdate, f\n // Keep this here (works, but for code commented-out below for file size reasons)\n // var tal= [];\n const txtWords = [\n 'Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur',\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December'\n ]\n // trailing backslash -> (dropped)\n // a backslash followed by any character (including backslash) -> the character\n // empty string -> empty string\n const formatChr = /\\\\?(.?)/gi\n const formatChrCb = function (t, s) {\n return f[t] ? f[t]() : s\n }\n const _pad = function (n, c) {\n n = String(n)\n while (n.length < c) {\n n = '0' + n\n }\n return n\n }\n f = {\n // Day\n d: function () {\n // Day of month w/leading 0; 01..31\n return _pad(f.j(), 2)\n },\n D: function () {\n // Shorthand day name; Mon...Sun\n return f.l()\n .slice(0, 3)\n },\n j: function () {\n // Day of month; 1..31\n return jsdate.getDate()\n },\n l: function () {\n // Full day name; Monday...Sunday\n return txtWords[f.w()] + 'day'\n },\n N: function () {\n // ISO-8601 day of week; 1[Mon]..7[Sun]\n return f.w() || 7\n },\n S: function () {\n // Ordinal suffix for day of month; st, nd, rd, th\n const j = f.j()\n let i = j % 10\n if (i <= 3 && parseInt((j % 100) / 10, 10) === 1) {\n i = 0\n }\n return ['st', 'nd', 'rd'][i - 1] || 'th'\n },\n w: function () {\n // Day of week; 0[Sun]..6[Sat]\n return jsdate.getDay()\n },\n z: function () {\n // Day of year; 0..365\n const a = new Date(f.Y(), f.n() - 1, f.j())\n const b = new Date(f.Y(), 0, 1)\n return Math.round((a - b) / 864e5)\n },\n\n // Week\n W: function () {\n // ISO-8601 week number\n const a = new Date(f.Y(), f.n() - 1, f.j() - f.N() + 3)\n const b = new Date(a.getFullYear(), 0, 4)\n return _pad(1 + Math.round((a - b) / 864e5 / 7), 2)\n },\n\n // Month\n F: function () {\n // Full month name; January...December\n return txtWords[6 + f.n()]\n },\n m: function () {\n // Month w/leading 0; 01...12\n return _pad(f.n(), 2)\n },\n M: function () {\n // Shorthand month name; Jan...Dec\n return f.F()\n .slice(0, 3)\n },\n n: function () {\n // Month; 1...12\n return jsdate.getMonth() + 1\n },\n t: function () {\n // Days in month; 28...31\n return (new Date(f.Y(), f.n(), 0))\n .getDate()\n },\n\n // Year\n L: function () {\n // Is leap year?; 0 or 1\n const j = f.Y()\n return j % 4 === 0 & j % 100 !== 0 | j % 400 === 0\n },\n o: function () {\n // ISO-8601 year\n const n = f.n()\n const W = f.W()\n const Y = f.Y()\n return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0)\n },\n Y: function () {\n // Full year; e.g. 1980...2010\n return jsdate.getFullYear()\n },\n y: function () {\n // Last two digits of year; 00...99\n return f.Y()\n .toString()\n .slice(-2)\n },\n\n // Time\n a: function () {\n // am or pm\n return jsdate.getHours() > 11 ? 'pm' : 'am'\n },\n A: function () {\n // AM or PM\n return f.a()\n .toUpperCase()\n },\n B: function () {\n // Swatch Internet time; 000..999\n const H = jsdate.getUTCHours() * 36e2\n // Hours\n const i = jsdate.getUTCMinutes() * 60\n // Minutes\n // Seconds\n const s = jsdate.getUTCSeconds()\n return _pad(Math.floor((H + i + s + 36e2) / 86.4) % 1e3, 3)\n },\n g: function () {\n // 12-Hours; 1..12\n return f.G() % 12 || 12\n },\n G: function () {\n // 24-Hours; 0..23\n return jsdate.getHours()\n },\n h: function () {\n // 12-Hours w/leading 0; 01..12\n return _pad(f.g(), 2)\n },\n H: function () {\n // 24-Hours w/leading 0; 00..23\n return _pad(f.G(), 2)\n },\n i: function () {\n // Minutes w/leading 0; 00..59\n return _pad(jsdate.getMinutes(), 2)\n },\n s: function () {\n // Seconds w/leading 0; 00..59\n return _pad(jsdate.getSeconds(), 2)\n },\n u: function () {\n // Microseconds; 000000-999000\n return _pad(jsdate.getMilliseconds() * 1000, 6)\n },\n\n // Timezone\n e: function () {\n // Timezone identifier; e.g. Atlantic/Azores, ...\n // The following works, but requires inclusion of the very large\n // timezone_abbreviations_list() function.\n /* return that.date_default_timezone_get();\n */\n const msg = 'Not supported (see source code of date() for timezone on how to add support)'\n throw new Error(msg)\n },\n I: function () {\n // DST observed?; 0 or 1\n // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.\n // If they are not equal, then DST is observed.\n const a = new Date(f.Y(), 0)\n // Jan 1\n const c = Date.UTC(f.Y(), 0)\n // Jan 1 UTC\n const b = new Date(f.Y(), 6)\n // Jul 1\n // Jul 1 UTC\n const d = Date.UTC(f.Y(), 6)\n return ((a - c) !== (b - d)) ? 1 : 0\n },\n O: function () {\n // Difference to GMT in hour format; e.g. +0200\n const tzo = jsdate.getTimezoneOffset()\n const a = Math.abs(tzo)\n return (tzo > 0 ? '-' : '+') + _pad(Math.floor(a / 60) * 100 + a % 60, 4)\n },\n P: function () {\n // Difference to GMT w/colon; e.g. +02:00\n const O = f.O()\n return (O.substr(0, 3) + ':' + O.substr(3, 2))\n },\n T: function () {\n // The following works, but requires inclusion of the very\n // large timezone_abbreviations_list() function.\n /* var abbr, i, os, _default;\n if (!tal.length) {\n tal = that.timezone_abbreviations_list();\n }\n if ($locutus && $locutus.default_timezone) {\n _default = $locutus.default_timezone;\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n if (tal[abbr][i].timezone_id === _default) {\n return abbr.toUpperCase();\n }\n }\n }\n }\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n os = -jsdate.getTimezoneOffset() * 60;\n if (tal[abbr][i].offset === os) {\n return abbr.toUpperCase();\n }\n }\n }\n */\n return 'UTC'\n },\n Z: function () {\n // Timezone offset in seconds (-43200...50400)\n return -jsdate.getTimezoneOffset() * 60\n },\n\n // Full Date/Time\n c: function () {\n // ISO-8601 date.\n return 'Y-m-d\\\\TH:i:sP'.replace(formatChr, formatChrCb)\n },\n r: function () {\n // RFC 2822\n return 'D, d M Y H:i:s O'.replace(formatChr, formatChrCb)\n },\n U: function () {\n // Seconds since UNIX epoch\n return jsdate / 1000 | 0\n }\n }\n\n const _date = function (format, timestamp) {\n jsdate = (timestamp === undefined\n ? new Date() // Not provided\n : (timestamp instanceof Date)\n ? new Date(timestamp) // JS Date()\n : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)\n )\n return format.replace(formatChr, formatChrCb)\n }\n\n return _date(format, timestamp)\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/date.js"],"names":["module","exports","date","format","timestamp","jsdate","f","txtWords","formatChr","formatChrCb","t","s","_pad","n","c","String","length","d","j","D","l","slice","getDate","w","N","S","i","parseInt","getDay","z","a","Date","Y","b","Math","round","W","getFullYear","F","m","M","getMonth","L","o","y","toString","getHours","A","toUpperCase","B","H","getUTCHours","getUTCMinutes","getUTCSeconds","floor","g","G","h","getMinutes","getSeconds","u","getMilliseconds","e","msg","Error","I","UTC","O","tzo","getTimezoneOffset","abs","P","substr","T","Z","replace","r","U","_date","undefined"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,IAAT,CAAcC,MAAd,EAAsBC,SAAtB,EAAiC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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aAAO,iBAAiB6D,OAAjB,CAAyBnE,SAAzB,EAAoCC,WAApC,CAAP;AACD,KAtNC;AAuNFmE,OAAG,aAAY;AACb;AACA,aAAO,mBAAmBD,OAAnB,CAA2BnE,SAA3B,EAAsCC,WAAtC,CAAP;AACD,KA1NC;AA2NFoE,OAAG,aAAY;AACb;AACA,aAAQxE,SAAS,IAAV,GAAkB,CAAzB;AACD;AA9NC,GAAJ;;AAiOA,MAAMyE,QAAQ,SAARA,KAAQ,CAAU3E,MAAV,EAAkBC,SAAlB,EAA6B;AACzCC,aACED,cAAc2E,SAAd,GACI,IAAIhD,IAAJ,EADJ,CACe;AADf,MAEI3B,qBAAqB2B,IAArB,GACE,IAAIA,IAAJ,CAAS3B,SAAT,CADF,CACsB;AADtB,MAEE,IAAI2B,IAAJ,CAAS3B,YAAY,IAArB,CALR,CADyC,CAMN;AACnC,WAAOD,OAAOwE,OAAP,CAAenE,SAAf,EAA0BC,WAA1B,CAAP;AACD,GARD;;AAUA,SAAOqE,MAAM3E,MAAN,EAAcC,SAAd,CAAP;AACD,CAhVD","file":"date.js","sourcesContent":["module.exports = function date(format, timestamp) {\n // discuss at: https://locutus.io/php/date/\n // original by: Carlos R. L. Rodrigues (https://www.jsfromhell.com)\n // original by: gettimeofday\n // parts by: Peter-Paul Koch (https://www.quirksmode.org/js/beat.html)\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: MeEtc (https://yass.meetcweb.com)\n // improved by: Brad Touesnard\n // improved by: Tim Wiel\n // improved by: Bryan Elliott\n // improved by: David Randall\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Brett Zamir (https://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Thomas Beaucourt (https://www.webapp.fr)\n // improved by: JT\n // improved by: Theriault (https://github.com/Theriault)\n // improved by: Rafał Kukawski (https://blog.kukawski.pl)\n // improved by: Theriault (https://github.com/Theriault)\n // input by: Brett Zamir (https://brett-zamir.me)\n // input by: majak\n // input by: Alex\n // input by: Martin\n // input by: Alex Wilson\n // input by: Haravikk\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: majak\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // bugfixed by: omid (https://locutus.io/php/380:380#comment_137122)\n // bugfixed by: Chris (https://www.devotis.nl/)\n // note 1: Uses global: locutus to store the default timezone\n // note 1: Although the function potentially allows timezone info\n // note 1: (see notes), it currently does not set\n // note 1: per a timezone specified by date_default_timezone_set(). Implementers might use\n // note 1: $locutus.currentTimezoneOffset and\n // note 1: $locutus.currentTimezoneDST set by that function\n // note 1: in order to adjust the dates in this function\n // note 1: (or our other date functions!) accordingly\n // example 1: date('H:m:s \\\\m \\\\i\\\\s \\\\m\\\\o\\\\n\\\\t\\\\h', 1062402400)\n // returns 1: '07:09:40 m is month'\n // example 2: date('F j, Y, g:i a', 1062462400)\n // returns 2: 'September 2, 2003, 12:26 am'\n // example 3: date('Y W o', 1062462400)\n // returns 3: '2003 36 2003'\n // example 4: var $x = date('Y m d', (new Date()).getTime() / 1000)\n // example 4: $x = $x + ''\n // example 4: var $result = $x.length // 2009 01 09\n // returns 4: 10\n // example 5: date('W', 1104534000)\n // returns 5: '52'\n // example 6: date('B t', 1104534000)\n // returns 6: '999 31'\n // example 7: date('W U', 1293750000.82); // 2010-12-31\n // returns 7: '52 1293750000'\n // example 8: date('W', 1293836400); // 2011-01-01\n // returns 8: '52'\n // example 9: date('W Y-m-d', 1293974054); // 2011-01-02\n // returns 9: '52 2011-01-02'\n // test: skip-1 skip-2 skip-5\n\n let jsdate, f\n // Keep this here (works, but for code commented-out below for file size reasons)\n // var tal= [];\n const txtWords = [\n 'Sun',\n 'Mon',\n 'Tues',\n 'Wednes',\n 'Thurs',\n 'Fri',\n 'Satur',\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ]\n // trailing backslash -> (dropped)\n // a backslash followed by any character (including backslash) -> the character\n // empty string -> empty string\n const formatChr = /\\\\?(.?)/gi\n const formatChrCb = function (t, s) {\n return f[t] ? f[t]() : s\n }\n const _pad = function (n, c) {\n n = String(n)\n while (n.length < c) {\n n = '0' + n\n }\n return n\n }\n f = {\n // Day\n d: function () {\n // Day of month w/leading 0; 01..31\n return _pad(f.j(), 2)\n },\n D: function () {\n // Shorthand day name; Mon...Sun\n return f.l().slice(0, 3)\n },\n j: function () {\n // Day of month; 1..31\n return jsdate.getDate()\n },\n l: function () {\n // Full day name; Monday...Sunday\n return txtWords[f.w()] + 'day'\n },\n N: function () {\n // ISO-8601 day of week; 1[Mon]..7[Sun]\n return f.w() || 7\n },\n S: function () {\n // Ordinal suffix for day of month; st, nd, rd, th\n const j = f.j()\n let i = j % 10\n if (i <= 3 && parseInt((j % 100) / 10, 10) === 1) {\n i = 0\n }\n return ['st', 'nd', 'rd'][i - 1] || 'th'\n },\n w: function () {\n // Day of week; 0[Sun]..6[Sat]\n return jsdate.getDay()\n },\n z: function () {\n // Day of year; 0..365\n const a = new Date(f.Y(), f.n() - 1, f.j())\n const b = new Date(f.Y(), 0, 1)\n return Math.round((a - b) / 864e5)\n },\n\n // Week\n W: function () {\n // ISO-8601 week number\n const a = new Date(f.Y(), f.n() - 1, f.j() - f.N() + 3)\n const b = new Date(a.getFullYear(), 0, 4)\n return _pad(1 + Math.round((a - b) / 864e5 / 7), 2)\n },\n\n // Month\n F: function () {\n // Full month name; January...December\n return txtWords[6 + f.n()]\n },\n m: function () {\n // Month w/leading 0; 01...12\n return _pad(f.n(), 2)\n },\n M: function () {\n // Shorthand month name; Jan...Dec\n return f.F().slice(0, 3)\n },\n n: function () {\n // Month; 1...12\n return jsdate.getMonth() + 1\n },\n t: function () {\n // Days in month; 28...31\n return new Date(f.Y(), f.n(), 0).getDate()\n },\n\n // Year\n L: function () {\n // Is leap year?; 0 or 1\n const j = f.Y()\n return ((j % 4 === 0) & (j % 100 !== 0)) | (j % 400 === 0)\n },\n o: function () {\n // ISO-8601 year\n const n = f.n()\n const W = f.W()\n const Y = f.Y()\n return Y + (n === 12 && W < 9 ? 1 : n === 1 && W > 9 ? -1 : 0)\n },\n Y: function () {\n // Full year; e.g. 1980...2010\n return jsdate.getFullYear()\n },\n y: function () {\n // Last two digits of year; 00...99\n return f.Y().toString().slice(-2)\n },\n\n // Time\n a: function () {\n // am or pm\n return jsdate.getHours() > 11 ? 'pm' : 'am'\n },\n A: function () {\n // AM or PM\n return f.a().toUpperCase()\n },\n B: function () {\n // Swatch Internet time; 000..999\n const H = jsdate.getUTCHours() * 36e2\n // Hours\n const i = jsdate.getUTCMinutes() * 60\n // Minutes\n // Seconds\n const s = jsdate.getUTCSeconds()\n return _pad(Math.floor((H + i + s + 36e2) / 86.4) % 1e3, 3)\n },\n g: function () {\n // 12-Hours; 1..12\n return f.G() % 12 || 12\n },\n G: function () {\n // 24-Hours; 0..23\n return jsdate.getHours()\n },\n h: function () {\n // 12-Hours w/leading 0; 01..12\n return _pad(f.g(), 2)\n },\n H: function () {\n // 24-Hours w/leading 0; 00..23\n return _pad(f.G(), 2)\n },\n i: function () {\n // Minutes w/leading 0; 00..59\n return _pad(jsdate.getMinutes(), 2)\n },\n s: function () {\n // Seconds w/leading 0; 00..59\n return _pad(jsdate.getSeconds(), 2)\n },\n u: function () {\n // Microseconds; 000000-999000\n return _pad(jsdate.getMilliseconds() * 1000, 6)\n },\n\n // Timezone\n e: function () {\n // Timezone identifier; e.g. Atlantic/Azores, ...\n // The following works, but requires inclusion of the very large\n // timezone_abbreviations_list() function.\n /* return that.date_default_timezone_get();\n */\n const msg = 'Not supported (see source code of date() for timezone on how to add support)'\n throw new Error(msg)\n },\n I: function () {\n // DST observed?; 0 or 1\n // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.\n // If they are not equal, then DST is observed.\n const a = new Date(f.Y(), 0)\n // Jan 1\n const c = Date.UTC(f.Y(), 0)\n // Jan 1 UTC\n const b = new Date(f.Y(), 6)\n // Jul 1\n // Jul 1 UTC\n const d = Date.UTC(f.Y(), 6)\n return a - c !== b - d ? 1 : 0\n },\n O: function () {\n // Difference to GMT in hour format; e.g. +0200\n const tzo = jsdate.getTimezoneOffset()\n const a = Math.abs(tzo)\n return (tzo > 0 ? '-' : '+') + _pad(Math.floor(a / 60) * 100 + (a % 60), 4)\n },\n P: function () {\n // Difference to GMT w/colon; e.g. +02:00\n const O = f.O()\n return O.substr(0, 3) + ':' + O.substr(3, 2)\n },\n T: function () {\n // The following works, but requires inclusion of the very\n // large timezone_abbreviations_list() function.\n /* var abbr, i, os, _default;\n if (!tal.length) {\n tal = that.timezone_abbreviations_list();\n }\n if ($locutus && $locutus.default_timezone) {\n _default = $locutus.default_timezone;\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n if (tal[abbr][i].timezone_id === _default) {\n return abbr.toUpperCase();\n }\n }\n }\n }\n for (abbr in tal) {\n for (i = 0; i < tal[abbr].length; i++) {\n os = -jsdate.getTimezoneOffset() * 60;\n if (tal[abbr][i].offset === os) {\n return abbr.toUpperCase();\n }\n }\n }\n */\n return 'UTC'\n },\n Z: function () {\n // Timezone offset in seconds (-43200...50400)\n return -jsdate.getTimezoneOffset() * 60\n },\n\n // Full Date/Time\n c: function () {\n // ISO-8601 date.\n return 'Y-m-d\\\\TH:i:sP'.replace(formatChr, formatChrCb)\n },\n r: function () {\n // RFC 2822\n return 'D, d M Y H:i:s O'.replace(formatChr, formatChrCb)\n },\n U: function () {\n // Seconds since UNIX epoch\n return (jsdate / 1000) | 0\n },\n }\n\n const _date = function (format, timestamp) {\n jsdate =\n timestamp === undefined\n ? new Date() // Not provided\n : timestamp instanceof Date\n ? new Date(timestamp) // JS Date()\n : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)\n return format.replace(formatChr, formatChrCb)\n }\n\n return _date(format, timestamp)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/date_parse.js"],"names":["module","exports","date_parse","date","strtotime","require","ts","e","dt","Date","retObj","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","second","getSeconds","fraction","parseFloat","getMilliseconds","is_localtime","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/date_parse.js"],"names":["module","exports","date_parse","date","strtotime","require","ts","e","dt","Date","retObj","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","second","getSeconds","fraction","parseFloat","getMilliseconds","is_localtime","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAoBC,IAApB,EAA0B;AACzC;AACA;AACA;AACA;;AAEA,MAAMC,YAAYC,QAAQ,uBAAR,CAAlB;AACA,MAAIC,WAAJ;;AAEA,MAAI;AACFA,SAAKF,UAAUD,IAAV,CAAL;AACD,GAFD,CAEE,OAAOI,CAAP,EAAU;AACVD,SAAK,KAAL;AACD;;AAED,MAAI,CAACA,EAAL,EAAS;AACP,WAAO,KAAP;AACD;;AAED,MAAME,KAAK,IAAIC,IAAJ,CAASH,KAAK,IAAd,CAAX;;AAEA,MAAMI,SAAS,EAAf;;AAEAA,SAAOC,IAAP,GAAcH,GAAGI,WAAH,EAAd;AACAF,SAAOG,KAAP,GAAeL,GAAGM,QAAH,KAAgB,CAA/B;AACAJ,SAAOK,GAAP,GAAaP,GAAGQ,OAAH,EAAb;AACAN,SAAOO,IAAP,GAAcT,GAAGU,QAAH,EAAd;AACAR,SAAOS,MAAP,GAAgBX,GAAGY,UAAH,EAAhB;AACAV,SAAOW,MAAP,GAAgBb,GAAGc,UAAH,EAAhB;AACAZ,SAAOa,QAAP,GAAkBC,WAAW,OAAOhB,GAAGiB,eAAH,EAAlB,CAAlB;AACAf,SAAOgB,YAAP,GAAsBlB,GAAGmB,iBAAH,OAA2B,CAAjD;;AAEA,SAAOjB,MAAP;AACD,CAjCD","file":"date_parse.js","sourcesContent":["module.exports = function date_parse(date) {\n // discuss at: https://locutus.io/php/date_parse/\n // original by: Brett Zamir (https://brett-zamir.me)\n // example 1: date_parse('2006-12-12 10:00:00')\n // returns 1: {year : 2006, month: 12, day: 12, hour: 10, minute: 0, second: 0, fraction: 0, is_localtime: false}\n\n const strtotime = require('../datetime/strtotime')\n let ts\n\n try {\n ts = strtotime(date)\n } catch (e) {\n ts = false\n }\n\n if (!ts) {\n return false\n }\n\n const dt = new Date(ts * 1000)\n\n const retObj = {}\n\n retObj.year = dt.getFullYear()\n retObj.month = dt.getMonth() + 1\n retObj.day = dt.getDate()\n retObj.hour = dt.getHours()\n retObj.minute = dt.getMinutes()\n retObj.second = dt.getSeconds()\n retObj.fraction = parseFloat('0.' + dt.getMilliseconds())\n retObj.is_localtime = dt.getTimezoneOffset() !== 0\n\n return retObj\n}\n"]}
|
package/php/datetime/getdate.js
CHANGED
|
@@ -11,8 +11,7 @@ module.exports = function getdate(timestamp) {
|
|
|
11
11
|
var _w = ['Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur'];
|
|
12
12
|
var _m = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
13
13
|
var d = typeof timestamp === 'undefined' ? new Date() : timestamp instanceof Date ? new Date(timestamp) // Not provided
|
|
14
|
-
: new Date(timestamp * 1000) // Javascript Date() // UNIX timestamp (auto-convert to int)
|
|
15
|
-
;
|
|
14
|
+
: new Date(timestamp * 1000); // Javascript Date() // UNIX timestamp (auto-convert to int)
|
|
16
15
|
var w = d.getDay();
|
|
17
16
|
var m = d.getMonth();
|
|
18
17
|
var y = d.getFullYear();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/getdate.js"],"names":["module","exports","getdate","timestamp","_w","_m","d","Date","w","getDay","m","getMonth","y","getFullYear","r","seconds","getSeconds","minutes","getMinutes","hours","getHours","mday","getDate","wday","mon","year","yday","Math","floor","weekday","month","parseInt","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/getdate.js"],"names":["module","exports","getdate","timestamp","_w","_m","d","Date","w","getDay","m","getMonth","y","getFullYear","r","seconds","getSeconds","minutes","getMinutes","hours","getHours","mday","getDate","wday","mon","year","yday","Math","floor","weekday","month","parseInt","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,OAAT,CAAiBC,SAAjB,EAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,KAAK,CAAC,KAAD,EAAQ,KAAR,EAAe,MAAf,EAAuB,QAAvB,EAAiC,OAAjC,EAA0C,KAA1C,EAAiD,OAAjD,CAAX;AACA,MAAMC,KAAK,CACT,SADS,EAET,UAFS,EAGT,OAHS,EAIT,OAJS,EAKT,KALS,EAMT,MANS,EAOT,MAPS,EAQT,QARS,EAST,WATS,EAUT,SAVS,EAWT,UAXS,EAYT,UAZS,CAAX;AAcA,MAAMC,IACJ,OAAOH,SAAP,KAAqB,WAArB,GACI,IAAII,IAAJ,EADJ,GAEIJ,qBAAqBI,IAArB,GACE,IAAIA,IAAJ,CAASJ,SAAT,CADF,CACsB;AADtB,IAEE,IAAII,IAAJ,CAASJ,YAAY,IAArB,CALR,CAvB2C,CA4BR;AACnC,MAAMK,IAAIF,EAAEG,MAAF,EAAV;AACA,MAAMC,IAAIJ,EAAEK,QAAF,EAAV;AACA,MAAMC,IAAIN,EAAEO,WAAF,EAAV;AACA,MAAMC,IAAI,EAAV;;AAEAA,IAAEC,OAAF,GAAYT,EAAEU,UAAF,EAAZ;AACAF,IAAEG,OAAF,GAAYX,EAAEY,UAAF,EAAZ;AACAJ,IAAEK,KAAF,GAAUb,EAAEc,QAAF,EAAV;AACAN,IAAEO,IAAF,GAASf,EAAEgB,OAAF,EAAT;AACAR,IAAES,IAAF,GAASf,CAAT;AACAM,IAAEU,GAAF,GAAQd,IAAI,CAAZ;AACAI,IAAEW,IAAF,GAASb,CAAT;AACAE,IAAEY,IAAF,GAASC,KAAKC,KAAL,CAAW,CAACtB,IAAI,IAAIC,IAAJ,CAASK,CAAT,EAAY,CAAZ,EAAe,CAAf,CAAL,IAA0B,QAArC,CAAT;AACAE,IAAEe,OAAF,GAAYzB,GAAGI,CAAH,IAAQ,KAApB;AACAM,IAAEgB,KAAF,GAAUzB,GAAGK,CAAH,CAAV;AACAI,IAAE,GAAF,IAASiB,SAASzB,EAAE0B,OAAF,KAAc,IAAvB,EAA6B,EAA7B,CAAT;;AAEA,SAAOlB,CAAP;AACD,CA/CD","file":"getdate.js","sourcesContent":["module.exports = function getdate(timestamp) {\n // discuss at: https://locutus.io/php/getdate/\n // original by: Paulo Freitas\n // input by: Alex\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // example 1: getdate(1055901520)\n // returns 1: {'seconds': 40, 'minutes': 58, 'hours': 1, 'mday': 18, 'wday': 3, 'mon': 6, 'year': 2003, 'yday': 168, 'weekday': 'Wednesday', 'month': 'June', '0': 1055901520}\n\n const _w = ['Sun', 'Mon', 'Tues', 'Wednes', 'Thurs', 'Fri', 'Satur']\n const _m = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ]\n const d =\n typeof timestamp === 'undefined'\n ? new Date()\n : timestamp instanceof Date\n ? new Date(timestamp) // Not provided\n : new Date(timestamp * 1000) // Javascript Date() // UNIX timestamp (auto-convert to int)\n const w = d.getDay()\n const m = d.getMonth()\n const y = d.getFullYear()\n const r = {}\n\n r.seconds = d.getSeconds()\n r.minutes = d.getMinutes()\n r.hours = d.getHours()\n r.mday = d.getDate()\n r.wday = w\n r.mon = m + 1\n r.year = y\n r.yday = Math.floor((d - new Date(y, 0, 1)) / 86400000)\n r.weekday = _w[w] + 'day'\n r.month = _m[m]\n r['0'] = parseInt(d.getTime() / 1000, 10)\n\n return r\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/gettimeofday.js"],"names":["module","exports","gettimeofday","returnFloat","t","Date","y","getTime","getFullYear","sec","getUTCSeconds","usec","getUTCMilliseconds","minuteswest","getTimezoneOffset","dsttime","UTC"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/gettimeofday.js"],"names":["module","exports","gettimeofday","returnFloat","t","Date","y","getTime","getFullYear","sec","getUTCSeconds","usec","getUTCMilliseconds","minuteswest","getTimezoneOffset","dsttime","UTC"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAsBC,WAAtB,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,IAAI,IAAIC,IAAJ,EAAV;AACA,MAAIC,IAAI,CAAR;;AAEA,MAAIH,WAAJ,EAAiB;AACf,WAAOC,EAAEG,OAAF,KAAc,IAArB;AACD;;AAED;AACAD,MAAIF,EAAEI,WAAF,EAAJ;AACA,SAAO;AACLC,SAAKL,EAAEM,aAAF,EADA;AAELC,UAAMP,EAAEQ,kBAAF,KAAyB,IAF1B;AAGLC,iBAAaT,EAAEU,iBAAF,EAHR;AAIL;AACAC,aAAS,KAAK,IAAIV,IAAJ,CAASC,CAAT,EAAY,CAAZ,IAAiBD,KAAKW,GAAL,CAASV,CAAT,EAAY,CAAZ,CAAjB,KAAoC,IAAID,IAAJ,CAASC,CAAT,EAAY,CAAZ,IAAiBD,KAAKW,GAAL,CAASV,CAAT,EAAY,CAAZ,CAA1D;AALJ,GAAP;AAOD,CA7BD","file":"gettimeofday.js","sourcesContent":["module.exports = function gettimeofday(returnFloat) {\n // discuss at: https://locutus.io/php/gettimeofday/\n // original by: Brett Zamir (https://brett-zamir.me)\n // original by: Josh Fraser (https://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/)\n // parts by: Breaking Par Consulting Inc (https://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7)\n // revised by: Theriault (https://github.com/Theriault)\n // example 1: var $obj = gettimeofday()\n // example 1: var $result = ('sec' in $obj && 'usec' in $obj && 'minuteswest' in $obj &&80, 'dsttime' in $obj)\n // returns 1: true\n // example 2: var $timeStamp = gettimeofday(true)\n // example 2: var $result = $timeStamp > 1000000000 && $timeStamp < 2000000000\n // returns 2: true\n\n const t = new Date()\n let y = 0\n\n if (returnFloat) {\n return t.getTime() / 1000\n }\n\n // Store current year.\n y = t.getFullYear()\n return {\n sec: t.getUTCSeconds(),\n usec: t.getUTCMilliseconds() * 1000,\n minuteswest: t.getTimezoneOffset(),\n // Compare Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC to see if DST is observed.\n dsttime: 0 + (new Date(y, 0) - Date.UTC(y, 0) !== new Date(y, 6) - Date.UTC(y, 6)),\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/gmdate.js"],"names":["module","exports","gmdate","format","timestamp","date","require","dt","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/gmdate.js"],"names":["module","exports","gmdate","format","timestamp","date","require","dt","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,CAAgBC,MAAhB,EAAwBC,SAAxB,EAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,OAAOC,QAAQ,kBAAR,CAAb;;AAEA,MAAMC,KACJ,OAAOH,SAAP,KAAqB,WAArB,GACI,IAAII,IAAJ,EADJ,CACe;AADf,IAEIJ,qBAAqBI,IAArB,GACE,IAAIA,IAAJ,CAASJ,SAAT,CADF,CACsB;AADtB,IAEE,IAAII,IAAJ,CAASJ,YAAY,IAArB,CALR,CAVkD,CAef;;AAEnCA,cAAYI,KAAKC,KAAL,CAAWF,GAAGG,WAAH,GAAiBC,KAAjB,CAAuB,CAAvB,EAA0B,CAAC,CAA3B,CAAX,IAA4C,IAAxD;;AAEA,SAAON,KAAKF,MAAL,EAAaC,SAAb,CAAP;AACD,CApBD","file":"gmdate.js","sourcesContent":["module.exports = function gmdate(format, timestamp) {\n // discuss at: https://locutus.io/php/gmdate/\n // original by: Brett Zamir (https://brett-zamir.me)\n // input by: Alex\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // example 1: gmdate('H:m:s \\\\m \\\\i\\\\s \\\\m\\\\o\\\\n\\\\t\\\\h', 1062402400); // Return will depend on your timezone\n // returns 1: '07:09:40 m is month'\n\n const date = require('../datetime/date')\n\n const dt =\n typeof timestamp === 'undefined'\n ? new Date() // Not provided\n : timestamp instanceof Date\n ? new Date(timestamp) // Javascript Date()\n : new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)\n\n timestamp = Date.parse(dt.toUTCString().slice(0, -4)) / 1000\n\n return date(format, timestamp)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/gmmktime.js"],"names":["module","exports","gmmktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setUTCFullYear","setUTCHours","time","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/gmmktime.js"],"names":["module","exports","gmmktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setUTCFullYear","setUTCHours","time","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,QAAT,GAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,IAAI,IAAIC,IAAJ,EAAV;AACA,MAAMC,IAAIC,SAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAMC,IAAI,CAAC,OAAD,EAAU,SAAV,EAAqB,SAArB,EAAgC,OAAhC,EAAyC,MAAzC,EAAiD,UAAjD,CAAV;;AAEA,OAAKD,IAAI,CAAT,EAAYA,IAAIC,EAAEC,MAAlB,EAA0BF,GAA1B,EAA+B;AAC7B,QAAI,OAAOF,EAAEE,CAAF,CAAP,KAAgB,WAApB,EAAiC;AAC/BF,QAAEE,CAAF,IAAOJ,EAAE,WAAWK,EAAED,CAAF,CAAb,GAAP;AACA;AACAF,QAAEE,CAAF,KAAQA,MAAM,CAAd;AACD,KAJD,MAIO;AACLF,QAAEE,CAAF,IAAOG,SAASL,EAAEE,CAAF,CAAT,EAAe,EAAf,CAAP;AACA,UAAII,MAAMN,EAAEE,CAAF,CAAN,CAAJ,EAAiB;AACf,eAAO,KAAP;AACD;AACF;AACF;;AAED;AACAF,IAAE,CAAF,KAAQA,EAAE,CAAF,KAAQ,CAAR,GAAaA,EAAE,CAAF,KAAQ,EAAR,GAAa,GAAb,GAAmBA,EAAE,CAAF,KAAQ,GAAR,GAAc,IAAd,GAAqB,CAArD,GAA0D,CAAlE;;AAEA;AACA;AACAF,IAAES,cAAF,CAAiBP,EAAE,CAAF,CAAjB,EAAuBA,EAAE,CAAF,IAAO,CAA9B,EAAiCA,EAAE,CAAF,CAAjC;;AAEA;AACAF,IAAEU,WAAF,CAAcR,EAAE,CAAF,CAAd,EAAoBA,EAAE,CAAF,CAApB,EAA0BA,EAAE,CAAF,CAA1B;;AAEA,MAAMS,OAAOX,EAAEY,OAAF,EAAb;;AAEA;AACA;AACA,SAAO,CAAED,OAAO,GAAR,IAAgB,CAAjB,KAAuBA,OAAO,CAA9B,CAAP;AACD,CA1CD","file":"gmmktime.js","sourcesContent":["module.exports = function gmmktime() {\n // discuss at: https://locutus.io/php/gmmktime/\n // original by: Brett Zamir (https://brett-zamir.me)\n // original by: mktime\n // example 1: gmmktime(14, 10, 2, 2, 1, 2008)\n // returns 1: 1201875002\n // example 2: gmmktime(0, 0, -1, 1, 1, 1970)\n // returns 2: -1\n\n const d = new Date()\n const r = arguments\n let i = 0\n const e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear']\n\n for (i = 0; i < e.length; i++) {\n if (typeof r[i] === 'undefined') {\n r[i] = d['getUTC' + e[i]]()\n // +1 to fix JS months.\n r[i] += i === 3\n } else {\n r[i] = parseInt(r[i], 10)\n if (isNaN(r[i])) {\n return false\n }\n }\n }\n\n // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.\n r[5] += r[5] >= 0 ? (r[5] <= 69 ? 2e3 : r[5] <= 100 ? 1900 : 0) : 0\n\n // Set year, month (-1 to fix JS months), and date.\n // !This must come before the call to setHours!\n d.setUTCFullYear(r[5], r[3] - 1, r[4])\n\n // Set hours, minutes, and seconds.\n d.setUTCHours(r[0], r[1], r[2])\n\n const time = d.getTime()\n\n // Divide milliseconds by 1000 to return seconds and drop decimal.\n // Add 1 second if negative or it'll be off from PHP by 1 second.\n return ((time / 1e3) >> 0) - (time < 0)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/gmstrftime.js"],"names":["module","exports","gmstrftime","format","timestamp","strftime","require","_date","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/gmstrftime.js"],"names":["module","exports","gmstrftime","format","timestamp","strftime","require","_date","Date","parse","toUTCString","slice"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,UAAT,CAAoBC,MAApB,EAA4BC,SAA5B,EAAuC;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,WAAWC,QAAQ,sBAAR,CAAjB;;AAEA,MAAMC,QACJ,OAAOH,SAAP,KAAqB,WAArB,GACI,IAAII,IAAJ,EADJ,GAEIJ,qBAAqBI,IAArB,GACE,IAAIA,IAAJ,CAASJ,SAAT,CADF,GAEE,IAAII,IAAJ,CAASJ,YAAY,IAArB,CALR;;AAOAA,cAAYI,KAAKC,KAAL,CAAWF,MAAMG,WAAN,GAAoBC,KAApB,CAA0B,CAA1B,EAA6B,CAAC,CAA9B,CAAX,IAA+C,IAA3D;;AAEA,SAAON,SAASF,MAAT,EAAiBC,SAAjB,CAAP;AACD,CApBD","file":"gmstrftime.js","sourcesContent":["module.exports = function gmstrftime(format, timestamp) {\n // discuss at: https://locutus.io/php/gmstrftime/\n // original by: Brett Zamir (https://brett-zamir.me)\n // input by: Alex\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // example 1: gmstrftime(\"%A\", 1062462400)\n // returns 1: 'Tuesday'\n\n const strftime = require('../datetime/strftime')\n\n const _date =\n typeof timestamp === 'undefined'\n ? new Date()\n : timestamp instanceof Date\n ? new Date(timestamp)\n : new Date(timestamp * 1000)\n\n timestamp = Date.parse(_date.toUTCString().slice(0, -4)) / 1000\n\n return strftime(format, timestamp)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/idate.js"],"names":["module","exports","idate","format","timestamp","undefined","Error","length","_date","Date","a","Math","floor","getUTCHours","getUTCMinutes","getUTCSeconds","getDate","getHours","getMinutes","getFullYear","UTC","getMonth","getSeconds","round","getTime","getDay","parseInt","slice","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/idate.js"],"names":["module","exports","idate","format","timestamp","undefined","Error","length","_date","Date","a","Math","floor","getUTCHours","getUTCMinutes","getUTCSeconds","getDate","getHours","getMinutes","getFullYear","UTC","getMonth","getSeconds","round","getTime","getDay","parseInt","slice","getTimezoneOffset"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAeC,MAAf,EAAuBC,SAAvB,EAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA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;AAgDD,CA3ED","file":"idate.js","sourcesContent":["module.exports = function idate(format, timestamp) {\n // discuss at: https://locutus.io/php/idate/\n // original by: Brett Zamir (https://brett-zamir.me)\n // original by: date\n // original by: gettimeofday\n // input by: Alex\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: idate('y', 1255633200)\n // returns 1: 9\n\n if (format === undefined) {\n throw new Error('idate() expects at least 1 parameter, 0 given')\n }\n if (!format.length || format.length > 1) {\n throw new Error('idate format is one char')\n }\n\n // @todo: Need to allow date_default_timezone_set() (check for $locutus.default_timezone and use)\n const _date =\n typeof timestamp === 'undefined'\n ? new Date()\n : timestamp instanceof Date\n ? new Date(timestamp)\n : new Date(timestamp * 1000)\n let a\n\n switch (format) {\n case 'B':\n return (\n Math.floor((_date.getUTCHours() * 36e2 + _date.getUTCMinutes() * 60 + _date.getUTCSeconds() + 36e2) / 86.4) %\n 1e3\n )\n case 'd':\n return _date.getDate()\n case 'h':\n return _date.getHours() % 12 || 12\n case 'H':\n return _date.getHours()\n case 'i':\n return _date.getMinutes()\n case 'I':\n // capital 'i'\n // Logic original by getimeofday().\n // Compares Jan 1 minus Jan 1 UTC to Jul 1 minus Jul 1 UTC.\n // If they are not equal, then DST is observed.\n a = _date.getFullYear()\n return 0 + (new Date(a, 0) - Date.UTC(a, 0) !== new Date(a, 6) - Date.UTC(a, 6))\n case 'L':\n a = _date.getFullYear()\n return !(a & 3) && (a % 1e2 || !(a % 4e2)) ? 1 : 0\n case 'm':\n return _date.getMonth() + 1\n case 's':\n return _date.getSeconds()\n case 't':\n return new Date(_date.getFullYear(), _date.getMonth() + 1, 0).getDate()\n case 'U':\n return Math.round(_date.getTime() / 1000)\n case 'w':\n return _date.getDay()\n case 'W':\n a = new Date(_date.getFullYear(), _date.getMonth(), _date.getDate() - (_date.getDay() || 7) + 3)\n return 1 + Math.round((a - new Date(a.getFullYear(), 0, 4)) / 864e5 / 7)\n case 'y':\n return parseInt((_date.getFullYear() + '').slice(2), 10) // This function returns an integer, unlike _date()\n case 'Y':\n return _date.getFullYear()\n case 'z':\n return Math.floor((_date - new Date(_date.getFullYear(), 0, 1)) / 864e5)\n case 'Z':\n return -_date.getTimezoneOffset() * 60\n default:\n throw new Error('Unrecognized _date format token')\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/microtime.js"],"names":["module","exports","microtime","getAsFloat","s","now","performance","timing","navigationStart","Math","round","Date","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/microtime.js"],"names":["module","exports","microtime","getAsFloat","s","now","performance","timing","navigationStart","Math","round","Date","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,SAAT,CAAmBC,UAAnB,EAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,UAAJ;AACA,MAAIC,YAAJ;AACA,MAAI,OAAOC,WAAP,KAAuB,WAAvB,IAAsCA,YAAYD,GAAlD,IAAyDC,YAAYC,MAAzE,EAAiF;AAC/EF,UAAM,CAACC,YAAYD,GAAZ,KAAoBC,YAAYC,MAAZ,CAAmBC,eAAxC,IAA2D,GAAjE;AACA,QAAIL,UAAJ,EAAgB;AACd,aAAOE,GAAP;AACD;;AAED;AACAD,QAAIC,MAAM,CAAV;;AAEA,WAAOI,KAAKC,KAAL,CAAW,CAACL,MAAMD,CAAP,IAAY,GAAvB,IAA8B,GAA9B,GAAoC,GAApC,GAA0CA,CAAjD;AACD,GAVD,MAUO;AACLC,UAAM,CAACM,KAAKN,GAAL,GAAWM,KAAKN,GAAL,EAAX,GAAwB,IAAIM,IAAJ,GAAWC,OAAX,EAAzB,IAAiD,GAAvD;AACA,QAAIT,UAAJ,EAAgB;AACd,aAAOE,GAAP;AACD;;AAED;AACAD,QAAIC,MAAM,CAAV;;AAEA,WAAOI,KAAKC,KAAL,CAAW,CAACL,MAAMD,CAAP,IAAY,GAAvB,IAA8B,GAA9B,GAAoC,GAApC,GAA0CA,CAAjD;AACD;AACF,CAjCD","file":"microtime.js","sourcesContent":["module.exports = function microtime(getAsFloat) {\n // discuss at: https://locutus.io/php/microtime/\n // original by: Paulo Freitas\n // improved by: Dumitru Uzun (https://duzun.me)\n // example 1: var $timeStamp = microtime(true)\n // example 1: $timeStamp > 1000000000 && $timeStamp < 2000000000\n // returns 1: true\n // example 2: /^0\\.[0-9]{1,6} [0-9]{10,10}$/.test(microtime())\n // returns 2: true\n\n let s\n let now\n if (typeof performance !== 'undefined' && performance.now && performance.timing) {\n now = (performance.now() + performance.timing.navigationStart) / 1e3\n if (getAsFloat) {\n return now\n }\n\n // Math.round(now)\n s = now | 0\n\n return Math.round((now - s) * 1e6) / 1e6 + ' ' + s\n } else {\n now = (Date.now ? Date.now() : new Date().getTime()) / 1e3\n if (getAsFloat) {\n return now\n }\n\n // Math.round(now)\n s = now | 0\n\n return Math.round((now - s) * 1e3) / 1e3 + ' ' + s\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/php/datetime/mktime.js"],"names":["module","exports","mktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setFullYear","setHours","time","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,
|
|
1
|
+
{"version":3,"sources":["../../../src/php/datetime/mktime.js"],"names":["module","exports","mktime","d","Date","r","arguments","i","e","length","parseInt","isNaN","setFullYear","setHours","time","getTime"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,MAAT,GAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,IAAI,IAAIC,IAAJ,EAAV;AACA,MAAMC,IAAIC,SAAV;AACA,MAAIC,IAAI,CAAR;AACA,MAAMC,IAAI,CAAC,OAAD,EAAU,SAAV,EAAqB,SAArB,EAAgC,OAAhC,EAAyC,MAAzC,EAAiD,UAAjD,CAAV;;AAEA,OAAKD,IAAI,CAAT,EAAYA,IAAIC,EAAEC,MAAlB,EAA0BF,GAA1B,EAA+B;AAC7B,QAAI,OAAOF,EAAEE,CAAF,CAAP,KAAgB,WAApB,EAAiC;AAC/BF,QAAEE,CAAF,IAAOJ,EAAE,QAAQK,EAAED,CAAF,CAAV,GAAP;AACA;AACAF,QAAEE,CAAF,KAAQA,MAAM,CAAd;AACD,KAJD,MAIO;AACLF,QAAEE,CAAF,IAAOG,SAASL,EAAEE,CAAF,CAAT,EAAe,EAAf,CAAP;AACA,UAAII,MAAMN,EAAEE,CAAF,CAAN,CAAJ,EAAiB;AACf,eAAO,KAAP;AACD;AACF;AACF;;AAED;AACAF,IAAE,CAAF,KAAQA,EAAE,CAAF,KAAQ,CAAR,GAAaA,EAAE,CAAF,KAAQ,EAAR,GAAa,GAAb,GAAmBA,EAAE,CAAF,KAAQ,GAAR,GAAc,IAAd,GAAqB,CAArD,GAA0D,CAAlE;;AAEA;AACA;AACAF,IAAES,WAAF,CAAcP,EAAE,CAAF,CAAd,EAAoBA,EAAE,CAAF,IAAO,CAA3B,EAA8BA,EAAE,CAAF,CAA9B;;AAEA;AACAF,IAAEU,QAAF,CAAWR,EAAE,CAAF,CAAX,EAAiBA,EAAE,CAAF,CAAjB,EAAuBA,EAAE,CAAF,CAAvB;;AAEA,MAAMS,OAAOX,EAAEY,OAAF,EAAb;;AAEA;AACA;AACA,SAAO,CAAED,OAAO,GAAR,IAAgB,CAAjB,KAAuBA,OAAO,CAA9B,CAAP;AACD,CAzED","file":"mktime.js","sourcesContent":["module.exports = function mktime() {\n // discuss at: https://locutus.io/php/mktime/\n // original by: Kevin van Zonneveld (https://kvz.io)\n // improved by: baris ozdil\n // improved by: Kevin van Zonneveld (https://kvz.io)\n // improved by: FGFEmperor\n // improved by: Brett Zamir (https://brett-zamir.me)\n // input by: gabriel paderni\n // input by: Yannoo\n // input by: jakes\n // input by: 3D-GRAF\n // input by: Chris\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Kevin van Zonneveld (https://kvz.io)\n // bugfixed by: Marc Palau\n // bugfixed by: Brett Zamir (https://brett-zamir.me)\n // revised by: Theriault (https://github.com/Theriault)\n // note 1: The return values of the following examples are\n // note 1: received only if your system's timezone is UTC.\n // example 1: mktime(14, 10, 2, 2, 1, 2008)\n // returns 1: 1201875002\n // example 2: mktime(0, 0, 0, 0, 1, 2008)\n // returns 2: 1196467200\n // example 3: var $make = mktime()\n // example 3: var $td = new Date()\n // example 3: var $real = Math.floor($td.getTime() / 1000)\n // example 3: var $diff = ($real - $make)\n // example 3: $diff < 5\n // returns 3: true\n // example 4: mktime(0, 0, 0, 13, 1, 1997)\n // returns 4: 883612800\n // example 5: mktime(0, 0, 0, 1, 1, 1998)\n // returns 5: 883612800\n // example 6: mktime(0, 0, 0, 1, 1, 98)\n // returns 6: 883612800\n // example 7: mktime(23, 59, 59, 13, 0, 2010)\n // returns 7: 1293839999\n // example 8: mktime(0, 0, -1, 1, 1, 1970)\n // returns 8: -1\n\n const d = new Date()\n const r = arguments\n let i = 0\n const e = ['Hours', 'Minutes', 'Seconds', 'Month', 'Date', 'FullYear']\n\n for (i = 0; i < e.length; i++) {\n if (typeof r[i] === 'undefined') {\n r[i] = d['get' + e[i]]()\n // +1 to fix JS months.\n r[i] += i === 3\n } else {\n r[i] = parseInt(r[i], 10)\n if (isNaN(r[i])) {\n return false\n }\n }\n }\n\n // Map years 0-69 to 2000-2069 and years 70-100 to 1970-2000.\n r[5] += r[5] >= 0 ? (r[5] <= 69 ? 2e3 : r[5] <= 100 ? 1900 : 0) : 0\n\n // Set year, month (-1 to fix JS months), and date.\n // !This must come before the call to setHours!\n d.setFullYear(r[5], r[3] - 1, r[4])\n\n // Set hours, minutes, and seconds.\n d.setHours(r[0], r[1], r[2])\n\n const time = d.getTime()\n\n // Divide milliseconds by 1000 to return seconds and drop decimal.\n // Add 1 second if negative or it'll be off from PHP by 1 second.\n return ((time / 1e3) >> 0) - (time < 0)\n}\n"]}
|