2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
7 <polymer-element name="ct-last-updated" attributes="date">
9 <template if="{{ date }}">
18 background-color: red;
22 <span class="{{ date | _style }}">Updated @ {{ date | _hours }}:{{ date | _minutes }}</div>
29 _style: function(date) {
30 var staleness = date.minutesAgo();
32 return "stale_20minutes";
34 return "stale_10minutes";
36 return "stale_5minutes";
40 _hours: function(date) {
41 return date.getHours();
43 _minutes: function(date) {
44 return date.getMinutes().toString().padLeft(2, '0');