node_modules/hybrid-crypto-js/web/hybrid-crypto.js
/**
 * Converts a Date object to ASN.1
 * Handles the different format before and after 1st January 2050
 *
 * @param date date object.
 *
 * @return the ASN.1 object representing the date.
 */
Converts a Date object to ASN.1
Handles the different format before and after 1st January 2050

@param date date object.

@return the ASN.1 object representing the date.
Converts a Date object to ASN . 1 Handles the different format before and after 1st January 2050 @param date date object . @return the ASN . 1 object representing the date .
function _dateToAsn1(date) {
  if(date >= jan_1_1950 && date < jan_1_2050) {
    return asn1.create(
      asn1.Class.UNIVERSAL, asn1.Type.UTCTIME, false,
      asn1.dateToUtcTime(date));
  } else {
    return asn1.create(
      asn1.Class.UNIVERSAL, asn1.Type.GENERALIZEDTIME, false,
      asn1.dateToGeneralizedTime(date));
  }
}
function _dateToAsn1 ( date ) { if ( date >= jan_1_1950 && date < jan_1_2050 ) { return asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . UTCTIME , false , asn1 . dateToUtcTime ( date ) ) ; } else { return asn1 . create ( asn1 . Class . UNIVERSAL , asn1 . Type . GENERALIZEDTIME , false , asn1 . dateToGeneralizedTime ( date ) ) ; } }
Converts a Date object to ASN.1
 Handles the different format before and after 1st January 2050
Converts a Date object to ASN . 1 Handles the different format before and after 1st January 2050