Tabnine Logo
Date.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.stjs.javascript.Date
constructor

Best Java code snippets using org.stjs.javascript.Date.<init> (Showing top 20 results out of 315)

origin: org.st-js/server

@Override
public Date deserialize(JsonElement elem, Type typeOfT, JsonDeserializationContext context)
    throws JsonParseException {
  if (elem == null) {
    return null;
  }
  return new Date(elem.getAsString());
}
origin: org.st-js/server

@Override
public Date deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
  return new Date(jp.getText());
}
origin: com.eduworks/org.cassproject.schema.general

/**
 * Updates the ID timestamp of the object, for versioning purposes.
 *
 * @method updateTimestamp
 */
public void updateTimestamp() {
  String rawId = id.substring(0, id.lastIndexOf("/"));
  if (rawId.endsWith("/") == false)
    rawId += "/";
  rawId += new Date().getTime();
  id = rawId;
}
origin: org.st-js/shared

public static String Date() {
  return new Date().toString();
}
origin: org.st-js/shared

/**
 * Computes the date from the given arguments interpreting them as UTC and 
 * returns the corresponding time value.
 * 
 * <p>The <tt>UTC</tt> function differs from the <tt>Date</tt> constructor 
 * in two ways: it returns a time value as a <tt>Number</tt>, rather than 
 * creating a <tt>Date</tt> object, and it interprets the arguments in UTC
 * rather than as local time.
 * 
 * @param year the year (in UTC time zone)
 * @param month the month of the year (in UTC time zone)
 * @param day the day of the month (in UTC time zone)
 * @param hours the hour of the day (in UTC time zone)
 * @param minutes the minute of the hour (in UTC time zone)
 * @param seconds the second of the minute (in UTC time zone)
 * @param ms the milliseconds of the second (in UTC time zone)
 * @return the UTC time value corresponding to the given arguments
 */
public static double UTC(int year, int month, int day, int hours, int minutes, int seconds, int ms) {
  return new Date(year, month, day, hours, minutes, seconds, ms).getTime();
}
 
origin: com.eduworks/cass.rollup

  @Override
  public void $invoke(Long expirationDate) {
    //null expiration date or expired assertion
    if (expirationDate == null || expirationDate <= (long) new Date().getTime()) {
      cgb.assertionsFilledIn++;
      cgb.checkAssertionDetailsFetched();
    } else {
      sa.setExpirationDate(expirationDate);
      cgb.fetchAssertionDetailsNegativeStatus(a, sa);
    }
  }
},
origin: com.eduworks/cass.rollup

  @Override
  public void $invoke(Long assertionDate) {
    //null assertion date or future assertion
    if (assertionDate == null || assertionDate > (long) new Date().getTime()) {
      cgb.assertionsFilledIn++;
      cgb.checkAssertionDetailsFetched();
    } else {
      sa.setAssertionDate(assertionDate);
      cgb.fetchAssertionDetailsExpirationDate(a, sa);
    }
  }
},
origin: org.st-js/shared

/**
 * Returns the time value designating the UTC date and time of at the 
 * moment <tt>now</tt> is called.
 * 
 * @return the time value designating the UTC date and time of at the moment <tt>now</tt> is called.
 */
@BrowserCompatibility("IE:9+")
public static double now(){
  return new Date().getTime();
}
origin: com.eduworks/cass.rollup

protected void log(Object string) {
  if (logFunction != null)
    logFunction.$invoke("" + new Date().getTime() % 100000 + ": " + string);
}
origin: com.eduworks/org.cassproject.schema.general

/**
 * Will generate an identifier using the server URL provided (usually from
 * an EcRepository).
 *
 * @param {string} server Base URL of the server's repository functionality.
 * @method generateId
 */
public void generateId(String server) {
  id = server;
  if (!id.endsWith("/") && !id.endsWith("ce-"))
    id += "/";
  id += "data/";
  id += getDottedType();
  id += "/";
  id += EcRandom.generateUUID();
  id += "/";
  id += new Date().getTime();
}
origin: com.eduworks/org.cassproject.schema.general

/**
 * Will generate an identifier using the server URL provided (usually from
 * an EcRepository) and unique identifier.
 *
 * @param {string} server Base URL of the server's repository functionality.
 * @param {string} uniqueIdentifier Canonical identifier. Must contain a letter or symbol.
 * @method assignId
 */
public void assignId(String server, String uniqueIdentifier) {
  id = server;
  if (!id.endsWith("/"))
    id += "/";
  id += "data/"; //endpoint to CRUD data
  id += getDottedType(); //type information (ease of use)
  id += "/";
  id += uniqueIdentifier; //local identifier
  id += "/";
  id += new Date().getTime(); //version
}
origin: com.eduworks/ebac.repository

  @Override
  public void $invoke(Object p1) {
    if (p1 != null) {
      if (JSObjectAdapter.$get(p1, "ping") == "pong") {
        if (JSObjectAdapter.$get(p1, "time") != null)
          me.timeOffset = ((Long)(Object)new Date().getTime())-((Long)(Object)JSObjectAdapter.$get(p1, "time"));
        me.selectedServer = guess;
        me.autoDetectFound = true;
      }
    }
  }
};
origin: com.eduworks/cass.rollup

private void processInputParameters(CompetencyGraph inputGraph, String subjectPem, Long predictionDate, PapDependencyDefinitions dependencyDefs, PapSettings settings) {
  this.dependencyDefs = dependencyDefs;
  verifyDependencyDefs();
  this.settings = settings;
  if (this.settings == null) this.settings = new PapSettings();
  this.inputGraph = inputGraph;
  this.subjectPem = subjectPem;
  if (this.subjectPem != null) this.subjectPem = this.subjectPem.trim();
  this.predictionDate = predictionDate;
  if (this.predictionDate == null) this.predictionDate = (long)(new Date()).getTime();
  stepSize = STEP_SIZE_NUMERATOR /this.settings.getIterations();
  priorityQueueThreshold = this.settings.getPriorityQueueThreshold()/this.settings.getIterations();
}
origin: com.eduworks/cass.rollup

public void log(InquiryPacket ip, Object string) {
  if (logFunction != null) {
    String id = "";
    if (ip.competency != null && ip.competency.$length() > 0)
      id = ip.competency.$get(0).shortId() + ":";
    logFunction.$invoke(new Date().getTime() % 100000 + ": " + string);
  }
  ip.log += "\n" + string;
}
origin: com.eduworks/ebac.repository

  @Override
  public void $invoke(Object p1) {
    if (p1 != null) {
      if (JSObjectAdapter.$get(p1, "ping") == "pong") {
        if (JSObjectAdapter.$get(p1, "time") != null)
          me.timeOffset = ((Long)(Object)new Date().getTime())-((Long)(Object)JSObjectAdapter.$get(p1, "time"));
        if (me.autoDetectFound == false) {
          me.selectedServer = guess;
          me.autoDetectFound = true;
          success.$invoke();
        }
      }
    }
  }
};
origin: com.eduworks/ebac.identity

  @Override
  public void $invoke(Array<EcIdentity> pks) {
    Array cache = null;
    String stringified = JSGlobal.JSON.stringify(signatures);
    if (signatureSheetCaching) {
      cache = new Array();
      cache.$set(0, new Date().getTime() + finalDuration);
      cache.$set(1, stringified);
      JSObjectAdapter.$put(signatureSheetCache, server, cache);
    }
    success.$invoke(stringified);
  }
});
origin: com.eduworks/ebac.identity

/**
 * Asynchronously create a signature for a specific identity
 *
 * @param {long}   duration Length of time in milliseconds to authorize
 *                 control.
 * @param {String} server Server that we are authorizing.
 * @param {EcPpk}  ppk Key of the identity to create a signature for
 * @param success  Callback triggered once the signature sheet has been
 *                 created, returns the signature
 * @memberOf EcIdentityManager
 * @method createSignatureAsync
 * @static
 */
private static void createSignatureAsync(long duration, String server, EcPpk ppk, final Callback1<EbacSignature> success, final Callback1<String> failure) {
  final EbacSignature s = new EbacSignature();
  s.owner = ppk.toPk().toPem();
  s.expiry = new Date().getTime() + duration;
  s.server = server;
  EcRsaOaepAsync.sign(ppk, s.toJson(), new Callback1<String>() {
    @Override
    public void $invoke(String p1) {
      s.signature = p1;
      success.$invoke(s);
    }
  }, failure);
}
origin: com.eduworks/ebac.identity

/**
 * Create a signature for a specific identity, authorizing movement of data
 * outside of our control.
 *
 * @param {long}   duration Length of time in milliseconds to authorize
 *                 control.
 * @param {String} server Server that we are authorizing.
 * @param {EcPpk}  ppk Key of the identity to create a signature for
 * @return {Ebac Signature} Signature created
 * @memberOf EcIdentityManager
 * @method createSignature
 * @static
 */
public static EbacSignature createSignature(long duration, String server, EcPpk ppk) {
  EbacSignature s = new EbacSignature();
  s.owner = ppk.toPk().toPem();
  s.expiry = new Date().getTime() + duration;
  s.server = server;
  s.signature = EcRsaOaep.sign(ppk, s.toJson());
  return s;
}
origin: com.eduworks/ebac.identity

  cache = (Array) JSObjectAdapter.$get(signatureSheetCache, server);
  if (cache != null) {
    if ((Long) cache.$get(0) > new Date().getTime() + duration) {
      return (String) cache.$get(1);
if (signatureSheetCaching) {
  cache = new Array();
  cache.$set(0, new Date().getTime() + duration);
  cache.$set(1, stringified);
  JSObjectAdapter.$put(signatureSheetCache, server, cache);
origin: com.eduworks/cass.rollup

equivalentPackets = new Array<InquiryPacket>();
subPackets = new Array<InquiryPacket>();
dateCreated = new Date().getTime();
this.subject = subject;
this.competency = new Array<>();
org.stjs.javascriptDate<init>

Javadoc

Constructs a new Date object, setting it to the time value identifying the current time.

Popular methods of Date

  • getTime
    Returns the time value associated to this Date
  • UTC
    Computes the date from the given arguments interpreting them as UTC and returns the corresponding ti
  • getCalendar
  • getDate
    Returns the day of the month corresponding to this Date's time value, in the local time zone.
  • getDay
    Returns the day of the week corresponding to this Date's time value, in the local time zone. A weekd
  • getField
  • getFullYear
    Returns the year corresponding to this Date's time value, in the local time zone.
  • getMilliseconds
    Returns the milliseconds of the second corresponding to this Date's time value, in the local time zo
  • getMinutes
    Returns the minutes of the hour corresponding to this Date's time value, in the local time zone.
  • getMonth
    Returns the month number corresponding to this Date's time value, in the local time zone. Month numb
  • getSeconds
    Returns the seconds of the minute corresponding to this Date's time value, in the local time zone.
  • getUTC
  • getSeconds,
  • getUTC,
  • getUTCDate,
  • getUTCDay,
  • getUTCMilliseconds,
  • getUTCMinutes,
  • getUTCMonth,
  • getUTCSeconds,
  • setDate

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now