List of usage examples for com.google.gwt.core.client JsDate create
public static native JsDate create(String dateString) ;
From source file:com.bramosystems.oss.player.playlist.client.spf.SPFPlaylist.java
License:Apache License
/** * Sets the date this playlist was created * /*from www . j a v a 2s . c om*/ * @param date the creation date of this playlist */ public final void setDate(Date date) { setDateImpl(JsDate.create(date.getTime())); }
From source file:com.facebook.tsdb.tsdash.client.service.json.TimeSeriesDecoder.java
License:Apache License
private void replaceDateObject(JSONArray rowArray) { JSONObject dateObj = rowArray.get(0).isObject(); double value = dateObj.get("v").isNumber().doubleValue(); dateObj.put("v", new JSONObject(JsDate.create(value))); }
From source file:com.github.timeu.dygraphsgwt.client.options.Properties.java
License:Apache License
/** * Set a property./* www . jav a2 s . c o m*/ * * @param key The name of the property. * @param value The value of the property. */ public final void set(String key, Date value) { set(key, JsDate.create(value.getTime())); }
From source file:com.google.web.bindery.autobean.shared.impl.StringQuoter.java
License:Apache License
public static Date tryParseDate(String date) { try {//from w w w . j a va 2s .com return new Date(Long.parseLong(date)); } catch (NumberFormatException ignored) { } try { JsDate js = JsDate.create(date); return new Date((long) js.getTime()); } catch (JavaScriptException ignored) { } return null; }
From source file:com.googlecode.gwt.charts.client.util.DateHelper.java
License:Apache License
/** * Converts a java Date into a JsDate.//from ww w . j a va 2 s . com * * @param date a Date value * @return a JsDate value */ public static JsDate getJsDate(Date date) { if (date == null) { return null; } return JsDate.create(date.getTime()); }
From source file:com.googlecode.gwtphonegap.client.globalization.js.GlobalizationJsImpl.java
License:Apache License
@Override public void convertDateToString(Date date, DateOptions options, GlobalizationCallback<GlobalizationStringValue, GlobalizationError> callback) { if (options == null) { throw new IllegalArgumentException("options can not be null"); }//from w w w . j av a 2 s. c o m JsDate jsDate = JsDate.create(date.getTime()); convertDateToString0(jsDate, options.getFormatLength(), options.getSelector(), callback); }
From source file:com.googlecode.gwtphonegap.client.globalization.js.GlobalizationJsImpl.java
License:Apache License
@Override public void isDayLightSavingsTime(Date date, GlobalizationCallback<DayLightSavings, GlobalizationError> callback) { JsDate jsDate = JsDate.create(date.getTime()); isDayLightSavingsTime0(jsDate, callback); }
From source file:com.rhizospherejs.gwt.client.bridge.JsoBuilder.java
License:Open Source License
/** * Sets a Date on the target JavaScriptObject. * @param attribute The name of the variable that will store the value. * @param value//from www . ja v a 2s . c om */ @BridgeType(rhizosphereKind = RhizosphereKind.DATE) public final void setDate(String attribute, Date value) { nativeSetObject(target, attribute, JsDate.create(value.getTime())); }
From source file:gov.nist.spectrumbrowser.client.DailyStatsChart.java
License:Open Source License
public DailyStatsChart(SpectrumBrowser spectrumBrowser, SpectrumBrowserShowDatasets spectrumBrowserShowDatasets, ArrayList<SpectrumBrowserScreen> navigation, String sensorId, double latitude, double longitude, double altitude, long minTime, int days, String sys2detect, long minFreq, long maxFreq, long subBandMinFreq, long subBandMaxFreq, String measurementType, VerticalPanel verticalPanel) { super.setNavigation(verticalPanel, navigation, spectrumBrowser, END_LABEL); this.lat = latitude; this.lon = longitude; this.alt = altitude; this.navigation = new ArrayList<SpectrumBrowserScreen>(navigation); this.navigation.add(this); this.spectrumBrowserShowDatasets = spectrumBrowserShowDatasets; this.spectrumBrowser = spectrumBrowser; this.verticalPanel = verticalPanel; mMinFreq = minFreq;//from w w w . j a v a2s . co m mMaxFreq = maxFreq; mSubBandMinFreq = subBandMinFreq; mSubBandMaxFreq = subBandMaxFreq; this.sys2detect = sys2detect; JsDate jsDate = JsDate.create(minTime * 1000); int month = jsDate.getMonth(); int day = jsDate.getDay(); int year = jsDate.getFullYear(); logger.finer("StartDate is " + year + "/" + month + "/" + day); mMinTime = minTime; mMeasurementType = measurementType; mSensorId = sensorId; this.days = days; spectrumBrowserShowDatasets.freeze(); spectrumBrowser.getSpectrumBrowserService().getDailyMaxMinMeanStats(sensorId, latitude, longitude, altitude, minTime, days, sys2detect, minFreq, maxFreq, mSubBandMinFreq, mSubBandMaxFreq, this); }
From source file:gov.nist.spectrumbrowser.client.SensorInfoDisplay.java
License:Open Source License
long getSelectedDayBoundary(long time) { JsDate jsDate = JsDate.create(time * 1000); jsDate.setHours(0, 0, 0, 0); return (long) jsDate.getTime() / 1000; }