
This is the beginnings of an experimental new non-GWT web UI developed using a modern JS web framework, http://www.polymer-project.org/. It will coexist alongside the GWT UI until it is feature-complete. The functionality of this change is light years from complete, with a full laundry list of things that don't work. This change is simply meant to get the starting work in and continue iteration afterward. The contents of the polygerrit-ui directory started as the full tree of https://github.com/andybons/polygerrit at 219f531, plus a few more local changes since review started. In the future this directory will be pruned, rearranged, and integrated with the Buck build. Change-Id: Ifb6f5429e8031ee049225cdafa244ad1c21bf5b5
26 lines
942 B
JavaScript
26 lines
942 B
JavaScript
// Copyright (C) 2015 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
'use strict';
|
|
|
|
var util = util || {};
|
|
|
|
util.parseDate = function(dateStr) {
|
|
// Timestamps are given in UTC and have the format
|
|
// "'yyyy-mm-dd hh:mm:ss.fffffffff'" where "'ffffffffff'" represents
|
|
// nanoseconds.
|
|
// Munge the date into an ISO 8061 format and parse that.
|
|
return new Date(dateStr.replace(' ', 'T') + 'Z');
|
|
};
|