Built-In Namespace global__
| Method Attributes | Method Name and Description |
|---|---|
|
ArrayBuffertohex(buffer)
convert an ArrayBuffer to a hexadecimal string
This function converts from an ArrayBuffer to a hexadecimal string. |
|
|
b64nltohex(s)
convert a Base64 encoded string with new lines to a hexadecimal string
This function converts from a Base64 encoded string with new lines to a hexadecimal string. |
|
|
b64tob64u(s)
convert a Base64 encoded string to a Base64URL encoded string.
|
|
|
b64toutf8(s)
convert a Base64 encoded string to a UTF-8 encoded string including CJK or Latin.
|
|
|
b64utob64(s)
convert a Base64URL encoded string to a Base64 encoded string.
|
|
|
b64utohex(s)
convert a Base64URL encoded string to a hexadecimal string.
|
|
|
b64utos(s)
convert a Base64URL encoded string to a ASCII string.
|
|
|
b64utoutf8(s)
convert a Base64URL encoded string to a UTF-8 encoded string including CJK or Latin.
|
|
|
BAtohex(a)
convert an array of bytes(Number) to hexadecimal string.
|
|
|
BAtos(a)
convert an array of character codes to a string
|
|
|
datetozulu(d, flagUTCTime, flagMilli)
Date object to zulu time string
This function converts from Date object to GeneralizedTime string (i.e. |
|
|
convert UTFa hexadecimal string to a URLComponent string such like "%67%68".
|
|
|
hextoArrayBuffer(hex)
convert a hexadecimal string to an ArrayBuffer
This function converts from a hexadecimal string to an ArrayBuffer. |
|
|
hextob64(s)
convert a hexadecimal string to Base64 encoded string
This function converts from a hexadecimal string to Base64 encoded string without new lines. |
|
|
hextob64nl(s)
convert a hexadecimal string to Base64 encoded string with new lines
This function converts from a hexadecimal string to Base64 encoded string with new lines for each 64 characters. |
|
|
hextob64u(s)
convert a hexadecimal string to a Base64URL encoded string.
|
|
|
hextopem(dataHex, pemHeader)
get PEM string from hexadecimal data and header string
This function converts a hexadecimal string to a PEM string with
a specified header.
|
|
|
hextoposhex(s)
canonicalize hexadecimal string of positive integer
This method canonicalize a hexadecimal string of positive integer for two's complement representation. |
|
|
hextorstr(s)
convert a hexadecimal encoded string to raw string including non printable characters.
|
|
|
hextouricmp(s)
convert a hexadecimal string to a URLComponent string such like "%67%68".
|
|
|
hextoutf8(s)
convert a hexadecimal encoded string to a UTF-8 encoded string including CJK or Latin.
|
|
|
convert string of integer array to hexadecimal string.
|
|
|
convert all UNIX new line("\r\n") to DOS new line("\n") in
a String "s".
|
|
|
convert all DOS new line("\r\n") to UNIX new line("\n") in
a String "s".
|
|
|
pemtohex(s, sHead)
get hexacedimal string from PEM format data
This static method gets a hexacedimal string of contents from PEM format data. |
|
|
readFile(binFile)
read file and return file contents
This function only works in Node.js.
|
|
|
readFileHexByBin(binFile)
read binary file and return file contents as hexadecimal string
This function only works in Node.js.
|
|
|
readFileUTF8(utf8File)
read file and return file contents as utf-8 string
This function only works in Node.js.
|
|
|
rstrtohex(s)
convert a raw string including non printable characters to hexadecimal encoded string.
|
|
|
saveFile(binFile, rawString)
save raw string to file
This function only works in Node.js.
|
|
|
saveFileBinByHex(binFile, hexString)
save data represented by hexadecimal string to file
This function only works in Node.js.
|
|
|
stob64(s)
convert a ASCII string to a Base64 encoded string.
|
|
|
stob64u(s)
convert a ASCII string to a Base64URL encoded string.
|
|
|
stoBA(s)
convert a string to an array of character codes
|
|
|
stohex(s)
convert a ASCII string to a hexadecimal string of ASCII codes.
|
|
|
strdiffidx(s1, s2)
find index of string where two string differs
|
|
|
uricmptohex(s)
convert a URLComponent string such like "%67%68" to a hexadecimal string.
|
|
|
utf8tob64(s)
convert a UTF-8 encoded string including CJK or Latin to a Base64 encoded string.
|
|
|
utf8tob64u(s)
convert a UTF-8 encoded string including CJK or Latin to a Base64URL encoded string.
|
|
|
utf8tohex(s)
convert a UTF-8 encoded string including CJK or Latin to a hexadecimal encoded string.
|
|
|
zulutodate(s)
GeneralizedTime or UTCTime string to Date object
This function converts from GeneralizedTime string (i.e. |
|
|
zulutomsec(s)
GeneralizedTime or UTCTime string to milliseconds from Unix origin
This function converts from GeneralizedTime string (i.e. |
|
|
zulutosec(s)
GeneralizedTime or UTCTime string to seconds from Unix origin
This function converts from GeneralizedTime string (i.e. |
Method Detail
{String}
ArrayBuffertohex(buffer)
convert an ArrayBuffer to a hexadecimal string
This function converts from an ArrayBuffer to a hexadecimal string.
Defined in: base64x-1.1.js.
This function converts from an ArrayBuffer to a hexadecimal string.
Defined in: base64x-1.1.js.
var buffer = new ArrayBuffer(3); var view = new DataView(buffer); view.setUint8(0, 0xfa); view.setUint8(1, 0xfb); view.setUint8(2, 0x01); ArrayBuffertohex(buffer) → "fafb01"
- Parameters:
- {ArrayBuffer} buffer
- ArrayBuffer
- Since:
- jsrsasign 6.1.4 base64x 1.1.8
- Returns:
- {String} hexadecimal string
{String}
b64nltohex(s)
convert a Base64 encoded string with new lines to a hexadecimal string
This function converts from a Base64 encoded string with new lines to a hexadecimal string. This is useful to handle PEM encoded file. This function removes any non-Base64 characters (i.e. not 0-9,A-Z,a-z,\,+,=) including new line.
Defined in: base64x-1.1.js.
This function converts from a Base64 encoded string with new lines to a hexadecimal string. This is useful to handle PEM encoded file. This function removes any non-Base64 characters (i.e. not 0-9,A-Z,a-z,\,+,=) including new line.
Defined in: base64x-1.1.js.
hextob64nl( "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4\r\n" + "OTAxMjM0NTY3ODkwCg==\r\n") → "123456789012345678901234567890123456789012345678901234567890"
- Parameters:
- {String} s
- Base64 encoded string with new lines
- Since:
- base64x 1.1.3
- Returns:
- {String} hexadecimal string
{String}
b64tob64u(s)
b64tob64u("ab+c3f/==") → "ab-c3f_"
- Parameters:
- {String} s
- Base64 encoded string
- Returns:
- {String} Base64URL encoded string
{String}
b64toutf8(s)
convert a Base64 encoded string to a UTF-8 encoded string including CJK or Latin.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- Base64 encoded string
- Since:
- 1.1.1
- Returns:
- {String} UTF-8 encoded string
{String}
b64utob64(s)
b64utob64("ab-c3f_") → "ab+c3f/=="
- Parameters:
- {String} s
- Base64URL encoded string
- Returns:
- {String} Base64 encoded string
{String}
b64utohex(s)
- Parameters:
- {String} s
- Base64URL encoded string
- Returns:
- {String} hexadecimal string
{String}
b64utos(s)
convert a Base64URL encoded string to a ASCII string.
NOTE: This can't be used for Base64URL encoded non ASCII characters.
Defined in: base64x-1.1.js.
NOTE: This can't be used for Base64URL encoded non ASCII characters.
Defined in: base64x-1.1.js.
- Parameters:
- {s} s
- Base64URL encoded string
- Returns:
- {String} ASCII string
{String}
b64utoutf8(s)
convert a Base64URL encoded string to a UTF-8 encoded string including CJK or Latin.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- Base64URL encoded string
- Since:
- 1.1
- Returns:
- {String} UTF-8 encoded string
{String}
BAtohex(a)
- Parameters:
- {Array of Numbers} a
- array of bytes
- Returns:
- {String} hexadecimal string
{String}
BAtos(a)
convert an array of character codes to a string
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {Array of Numbers} a
- array of character codes
- Returns:
- {String} s
{String}
datetozulu(d, flagUTCTime, flagMilli)
Date object to zulu time string
This function converts from Date object to GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ). As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY. If flagMilli is true its result concludes milliseconds such like "20170520235959.42Z".
Defined in: base64x-1.1.js.
This function converts from Date object to GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ). As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY. If flagMilli is true its result concludes milliseconds such like "20170520235959.42Z".
Defined in: base64x-1.1.js.
d = new Date(Date.UTC(2017,4,20,23,59,59,670)); datetozulu(d) → "20170520235959Z" datetozulu(d, true) → "170520235959Z" datetozulu(d, false, true) → "20170520235959.67Z"
- Parameters:
- {Date} d
- Date object for specified time
- {Boolean} flagUTCTime
- if this is true year will be YY otherwise YYYY
- {Boolean} flagMilli
- if this is true result concludes milliseconds
- Since:
- jsrsasign 7.2.0 base64x 1.1.11
- Returns:
- {String} GeneralizedTime or UTCTime string (ex. 20170412235959.384Z)
{String}
encodeURIComponentAll(s)
convert UTFa hexadecimal string to a URLComponent string such like "%67%68".
Note that these "
Defined in: base64x-1.1.js.
Note that these "
0-9A-Za-z!'()*-._~" characters will not
converted to "%xx" format by builtin 'encodeURIComponent()' function.
However this 'encodeURIComponentAll()' function will convert
all of characters into "%xx" format.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- hexadecimal string
- Since:
- 1.1
- Returns:
- {String} URIComponent string such like "%67%68"
{ArrayBuffer}
hextoArrayBuffer(hex)
convert a hexadecimal string to an ArrayBuffer
This function converts from a hexadecimal string to an ArrayBuffer.
Defined in: base64x-1.1.js.
This function converts from a hexadecimal string to an ArrayBuffer.
Defined in: base64x-1.1.js.
hextoArrayBuffer("fffa01") → ArrayBuffer of [255, 250, 1]
- Parameters:
- {String} hex
- hexadecimal string
- Since:
- jsrsasign 6.1.4 base64x 1.1.8
- Returns:
- {ArrayBuffer} ArrayBuffer
{String}
hextob64(s)
convert a hexadecimal string to Base64 encoded string
This function converts from a hexadecimal string to Base64 encoded string without new lines.
Defined in: base64x-1.1.js.
This function converts from a hexadecimal string to Base64 encoded string without new lines.
Defined in: base64x-1.1.js.
hextob64("616161") → "YWFh"
- Parameters:
- {String} s
- hexadecimal string
- Since:
- base64x 1.1.3
- Returns:
- {String} resulted Base64 encoded string
{String}
hextob64nl(s)
convert a hexadecimal string to Base64 encoded string with new lines
This function converts from a hexadecimal string to Base64 encoded string with new lines for each 64 characters. This is useful for PEM encoded file.
Defined in: base64x-1.1.js.
This function converts from a hexadecimal string to Base64 encoded string with new lines for each 64 characters. This is useful for PEM encoded file.
Defined in: base64x-1.1.js.
hextob64nl("123456789012345678901234567890123456789012345678901234567890")
→
MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4 // new line
OTAxMjM0NTY3ODkwCg==
- Parameters:
- {String} s
- hexadecimal string
- Since:
- base64x 1.1.3
- Returns:
- {String} resulted Base64 encoded string with new lines
{String}
hextob64u(s)
convert a hexadecimal string to a Base64URL encoded string.
convert a hexadecimal string to a Base64URL encoded string. NOTE: If leading "0" is omitted and odd number length for hexadecimal leading "0" is automatically added.
Defined in: base64x-1.1.js.
convert a hexadecimal string to a Base64URL encoded string. NOTE: If leading "0" is omitted and odd number length for hexadecimal leading "0" is automatically added.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- hexadecimal string
- Returns:
- {String} Base64URL encoded string
{String}
hextopem(dataHex, pemHeader)
get PEM string from hexadecimal data and header string
This function converts a hexadecimal string to a PEM string with
a specified header. Its line break will be CRLF("\r\n").
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
hextopem('616161', 'RSA PRIVATE KEY') →
-----BEGIN PRIVATE KEY-----
YWFh
-----END PRIVATE KEY-----
- Parameters:
- {String} dataHex
- hexadecimal string of PEM body
- {String} pemHeader
- PEM header string (ex. 'RSA PRIVATE KEY')
- Since:
- jsrasign 7.2.1 base64x 1.1.12
- Returns:
- {String} PEM formatted string of input data
{String}
hextoposhex(s)
canonicalize hexadecimal string of positive integer
This method canonicalize a hexadecimal string of positive integer for two's complement representation. Canonicalized hexadecimal string of positive integer will be:
Defined in: base64x-1.1.js.
This method canonicalize a hexadecimal string of positive integer for two's complement representation. Canonicalized hexadecimal string of positive integer will be:
- Its length is always even.
- If odd length it will be padded with leading zero.
- If it is even length and its first character is "8" or greater, it will be padded with "00" to make it positive integer.
Defined in: base64x-1.1.js.
hextoposhex("abcd") → "00abcd"
hextoposhex("1234") → "1234"
hextoposhex("12345") → "012345"
- Parameters:
- {String} s
- hexadecimal string
- Since:
- base64x 1.1.10 jsrsasign 7.1.4
- Returns:
- {String} canonicalized hexadecimal string of positive integer
{String}
hextorstr(s)
convert a hexadecimal encoded string to raw string including non printable characters.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
hextorstr("610061") → "a\x00a"
- Parameters:
- {String} s
- hexadecimal encoded string
- Since:
- 1.1.2
- Returns:
- {String} raw string
{String}
hextouricmp(s)
convert a hexadecimal string to a URLComponent string such like "%67%68".
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- hexadecimal string
- Since:
- 1.1
- Returns:
- {String} URIComponent string such like "%67%68"
{String}
hextoutf8(s)
convert a hexadecimal encoded string to a UTF-8 encoded string including CJK or Latin.
Note that when input is improper hexadecimal string as UTF-8 string, this function returns 'null'.
Defined in: base64x-1.1.js.
Note that when input is improper hexadecimal string as UTF-8 string, this function returns 'null'.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- hexadecimal encoded string
- Since:
- 1.1.1
- Returns:
- {String} UTF-8 encoded string or null
{String}
intarystrtohex(s)
convert string of integer array to hexadecimal string.
This function converts a string of JavaScript integer array to a hexadecimal string. Each integer value shall be in a range from 0 to 255 otherwise it raise exception. Input string can have extra space or newline string so that they will be ignored.
Defined in: base64x-1.1.js.
This function converts a string of JavaScript integer array to a hexadecimal string. Each integer value shall be in a range from 0 to 255 otherwise it raise exception. Input string can have extra space or newline string so that they will be ignored.
Defined in: base64x-1.1.js.
intarystrtohex(" [123, 34, 101, 34, 58] ")
→ 7b2265223a (i.e. '{"e":' as string)
- Parameters:
- {String} s
- string of integer array
- Since:
- base64x 1.1.6 jsrsasign 5.0.2
- Throws:
- "malformed integer array string: *" for wrong input
- Returns:
- {String} hexadecimal string
{String}
newline_toDos(s)
convert all UNIX new line("\r\n") to DOS new line("\n") in
a String "s".
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- string
- Returns:
- {String} converted string
{String}
newline_toUnix(s)
convert all DOS new line("\r\n") to UNIX new line("\n") in
a String "s".
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- string
- Returns:
- {String} converted string
{String}
pemtohex(s, sHead)
get hexacedimal string from PEM format data
This static method gets a hexacedimal string of contents from PEM format data. You can explicitly specify PEM header by sHead argument. Any space characters such as white space or new line will be omitted.
NOTE: Now KEYUTIL.getHexFromPEM and X509.pemToHex have been deprecated since jsrsasign 7.2.1. Please use this method instead.
Defined in: base64x-1.1.js.
This static method gets a hexacedimal string of contents from PEM format data. You can explicitly specify PEM header by sHead argument. Any space characters such as white space or new line will be omitted.
NOTE: Now KEYUTIL.getHexFromPEM and X509.pemToHex have been deprecated since jsrsasign 7.2.1. Please use this method instead.
Defined in: base64x-1.1.js.
pemtohex("-----BEGIN PUBLIC KEY...") → "3082..."
pemtohex("-----BEGIN CERTIFICATE...", "CERTIFICATE") → "3082..."
pemtohex(" \r\n-----BEGIN DSA PRIVATE KEY...") → "3082..."
- Parameters:
- {String} s
- PEM formatted string
- {String} sHead
- PEM header string without BEGIN/END(OPTION)
- Since:
- jsrsasign 7.2.1 base64x 1.1.12
- Returns:
- {String} hexadecimal string data of PEM contents
{String}
readFile(binFile)
read file and return file contents
This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Defined in: nodeutil-1.0.js.
- Parameters:
- {String} binFile
- file name to be read
- Returns:
- {String} raw string of file contents
{String}
readFileHexByBin(binFile)
read binary file and return file contents as hexadecimal string
This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Defined in: nodeutil-1.0.js.
- Parameters:
- {String} binFile
- file name to be read
- Returns:
- {String} hexadecimal string of file contents
{String}
readFileUTF8(utf8File)
read file and return file contents as utf-8 string
This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Defined in: nodeutil-1.0.js.
- Parameters:
- {String} utf8File
- file name to be read
- Returns:
- {String} utf-8 string of file contents
{String}
rstrtohex(s)
convert a raw string including non printable characters to hexadecimal encoded string.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
rstrtohex("a\x00a") → "610061"
- Parameters:
- {String} s
- raw string
- Since:
- 1.1.2
- Returns:
- {String} hexadecimal encoded string
saveFile(binFile, rawString)
save raw string to file
This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Defined in: nodeutil-1.0.js.
- Parameters:
- {String} binFile
- file name to save contents.
- {String} rawString
- string contents to be saved.
saveFileBinByHex(binFile, hexString)
save data represented by hexadecimal string to file
This function only works in Node.js.
Defined in: nodeutil-1.0.js.
Defined in: nodeutil-1.0.js.
- Parameters:
- {String} binFile
- file name to save contents.
- {String} hexString
- hexadecimal string to be saved.
{String}
stob64(s)
convert a ASCII string to a Base64 encoded string.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
- Parameters:
- {s} s
- ASCII string
- Returns:
- {String} Base64 encoded string
{String}
stob64u(s)
convert a ASCII string to a Base64URL encoded string.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
- Parameters:
- {s} s
- ASCII string
- Returns:
- {String} Base64URL encoded string
{Array of Numbers}
stoBA(s)
convert a string to an array of character codes
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- Returns:
- {Array of Numbers}
{String}
stohex(s)
convert a ASCII string to a hexadecimal string of ASCII codes.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
NOTE: This can't be used for non ASCII characters.
Defined in: base64x-1.1.js.
- Parameters:
- {s} s
- ASCII string
- Returns:
- {String} hexadecimal string
{Number}
strdiffidx(s1, s2)
find index of string where two string differs
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
strdiffidx("abcdefg", "abcd4fg") -> 4
strdiffidx("abcdefg", "abcdefg") -> -1
strdiffidx("abcdefg", "abcdef") -> 6
strdiffidx("abcdefgh", "abcdef") -> 6
- Parameters:
- {String} s1
- string to compare
- {String} s2
- string to compare
- Since:
- jsrsasign 4.9.0 base64x 1.1.5
- Returns:
- {Number} string index of where character differs. Return -1 if same.
{String}
uricmptohex(s)
convert a URLComponent string such like "%67%68" to a hexadecimal string.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- URIComponent string such like "%67%68"
- Since:
- 1.1
- Returns:
- {String} hexadecimal string
{String}
utf8tob64(s)
convert a UTF-8 encoded string including CJK or Latin to a Base64 encoded string.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- UTF-8 encoded string
- Since:
- 1.1.1
- Returns:
- {String} Base64 encoded string
{String}
utf8tob64u(s)
convert a UTF-8 encoded string including CJK or Latin to a Base64URL encoded string.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- UTF-8 encoded string
- Since:
- 1.1
- Returns:
- {String} Base64URL encoded string
{String}
utf8tohex(s)
convert a UTF-8 encoded string including CJK or Latin to a hexadecimal encoded string.
Defined in: base64x-1.1.js.
Defined in: base64x-1.1.js.
- Parameters:
- {String} s
- UTF-8 encoded string
- Since:
- 1.1.1
- Returns:
- {String} hexadecimal encoded string
{Date}
zulutodate(s)
GeneralizedTime or UTCTime string to Date object
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to Date object. Argument string may have fraction of seconds and its length is one or more digits such as "20170410235959.1234567Z". As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to Date object. Argument string may have fraction of seconds and its length is one or more digits such as "20170410235959.1234567Z". As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
zulutodate( "071231235959Z").toUTCString() → "Mon, 31 Dec 2007 23:59:59 GMT"
zulutodate( "071231235959.1Z").toUTCString() → "Mon, 31 Dec 2007 23:59:59 GMT"
zulutodate("20071231235959Z").toUTCString() → "Mon, 31 Dec 2007 23:59:59 GMT"
zulutodate( "071231235959.34").getMilliseconds() → 340
- Parameters:
- {String} s
- GeneralizedTime or UTCTime string (ex. 20170412235959.384Z)
- Since:
- jsrsasign 7.1.3 base64x 1.1.9
- Returns:
- {Date} Date object for specified time
{Number}
zulutomsec(s)
GeneralizedTime or UTCTime string to milliseconds from Unix origin
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to milliseconds from Unix origin time (i.e. Jan 1 1970 0:00:00 UTC). Argument string may have fraction of seconds and its length is one or more digits such as "20170410235959.1234567Z". As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to milliseconds from Unix origin time (i.e. Jan 1 1970 0:00:00 UTC). Argument string may have fraction of seconds and its length is one or more digits such as "20170410235959.1234567Z". As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
zulutomsec( "071231235959Z") → 1199145599000 #Mon, 31 Dec 2007 23:59:59 GMT
zulutomsec( "071231235959.1Z") → 1199145599100 #Mon, 31 Dec 2007 23:59:59 GMT
zulutomsec( "071231235959.12345Z") → 1199145599123 #Mon, 31 Dec 2007 23:59:59 GMT
zulutomsec("20071231235959Z") → 1199145599000 #Mon, 31 Dec 2007 23:59:59 GMT
zulutomsec( "931231235959Z") → -410227201000 #Mon, 31 Dec 1956 23:59:59 GMT
- Parameters:
- {String} s
- GeneralizedTime or UTCTime string (ex. 20170412235959.384Z)
- Since:
- jsrsasign 7.1.3 base64x 1.1.9
- Returns:
- {Number} milliseconds from Unix origin time (i.e. Jan 1, 1970 0:00:00 UTC)
{Number}
zulutosec(s)
GeneralizedTime or UTCTime string to seconds from Unix origin
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to seconds from Unix origin time (i.e. Jan 1 1970 0:00:00 UTC). Argument string may have fraction of seconds however result value will be omitted. As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
This function converts from GeneralizedTime string (i.e. YYYYMMDDHHmmSSZ) or UTCTime string (i.e. YYMMDDHHmmSSZ) to seconds from Unix origin time (i.e. Jan 1 1970 0:00:00 UTC). Argument string may have fraction of seconds however result value will be omitted. As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.
Defined in: base64x-1.1.js.
zulutosec( "071231235959Z") → 1199145599 #Mon, 31 Dec 2007 23:59:59 GMT
zulutosec( "071231235959.1Z") → 1199145599 #Mon, 31 Dec 2007 23:59:59 GMT
zulutosec("20071231235959Z") → 1199145599 #Mon, 31 Dec 2007 23:59:59 GMT
- Parameters:
- {String} s
- GeneralizedTime or UTCTime string (ex. 20170412235959.384Z)
- Since:
- jsrsasign 7.1.3 base64x 1.1.9
- Returns:
- {Number} seconds from Unix origin time (i.e. Jan 1, 1970 0:00:00 UTC)