Example usage for com.google.gwt.i18n.client DateTimeFormat parse

List of usage examples for com.google.gwt.i18n.client DateTimeFormat parse

Introduction

In this page you can find the example usage for com.google.gwt.i18n.client DateTimeFormat parse.

Prototype

public int parse(String text, int start, Date date) 

Source Link

Document

This method modifies a Date object to reflect the date that is parsed from an input string.

Usage

From source file:com.tractionsoftware.gwt.user.client.ui.impl.UTCTimeBoxImplShared.java

License:Apache License

protected static final Long parseUsingFormat(String text, DateTimeFormat fmt) {
    Date date = new Date(0);
    int num = fmt.parse(text, 0, date);
    return (num != 0) ? new Long(normalizeInLocalRange(date.getTime() - UTCDateBox.timezoneOffsetMillis(date)))
            : null;/*w w w  . ja  v  a  2s .co m*/
}