Class Index | File Index

Classes


Class KJUR.asn1.DERAbstractTime


Extends KJUR.asn1.ASN1Object.
base class for ASN.1 DER Generalized/UTCTime class
Defined in: asn1-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
base class for ASN.1 DER Generalized/UTCTime class
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified, params
Method Summary
Method Attributes Method Name and Description
 
get string value of this string object (DEPRECATED)
 
setByDate(dateObject)
set value by a Date object
 
setByDateValue(year, month, day, hour, min, sec)
set value by a Date object
 
setByParam(params)
set parameter of time
 
setString(newS)
set value by a string (DEPRECATED)
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.DERAbstractTime(params)
base class for ASN.1 DER Generalized/UTCTime class
Parameters:
{Array} params
associative array of parameters (ex. {'str': '130430235959Z'})
See:
KJUR.asn1.ASN1Object - superclass
KJUR.asn1.DERGeneralizedTime
KJUR.asn1.DERUTCTime
KJUR.asn1.x509.Time
Method Detail
{String} getString()
get string value of this string object (DEPRECATED)
Deprecated:
from jsrsasign 10.4.1 asn1 1.0.22.
Returns:
{String} string value of this time object

setByDate(dateObject)
set value by a Date object
o = new KJUR.asn1.DERUTCTime();
o.setByDate(new Date("2016/12/31 23:59:59.12"));
// 2015-Jan-31 23:59:59.12
o.setByDate(new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)));
Parameters:
{Date} dateObject
Date object to set ASN.1 value(V)
Since:
jsrsasign 10.4.1 asn1 1.0.22

setByDateValue(year, month, day, hour, min, sec)
set value by a Date object
Parameters:
{Integer} year
year of date (ex. 2013)
{Integer} month
month of date between 1 and 12 (ex. 12)
{Integer} day
day of month
{Integer} hour
hours of date
{Integer} min
minutes of date
{Integer} sec
seconds of date

setByParam(params)
set parameter of time
d1 = new KJUR.asn1.DERGeneralizedTime();
d1.setByParam("20210930235959.123Z");
d1.setByParam({str: "20210930235959.123Z"});

d1.setByParam(new Date("2013/12/31 23:59:59.12"));
date1 = new Date(Date.UTC(2021,8,31,23,59,59,123));
d1.setByParam(date1);
d1.setByParam({date: date1});
d1.setByParam({date: date1, millis: true});
Parameters:
{Object} params
JSON object, Date object or string of time
Since:
jsrsasign 10.4.1 asn1 1.0.22 NOTE: If a member "millis" has a value "true", a fraction of second will be specified for this object. This default is "false".

setString(newS)
set value by a string (DEPRECATED)
Parameters:
{String} newS
value by a string to set such like "130430235959Z"
Deprecated:
from jsrsasign 10.4.1 asn1 1.0.22.

© 2012-2023 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0