couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garrensmith <...@git.apache.org>
Subject [GitHub] couchdb pull request: Fauxton: fix missing leading zeros in logs
Date Sun, 13 Apr 2014 17:28:51 GMT
Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/208#discussion_r11565945
  
    --- Diff: src/fauxton/app/addons/logs/resources.js ---
    @@ -23,12 +23,22 @@ function (app, FauxtonAPI, Backbone) {
       Log.Model = Backbone.Model.extend({
     
         date: function () {
    -      var date = new Date(this.get('date'));
    +      var date = new Date(this.get('date')),
    +          formattedTime,
    +          formattedDate;
     
    -      var formatted_time = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
    -      var formatted_date = date.toDateString().slice(4, 10);
    +      function addLeadingZeros (part) {
    --- End diff --
    
    This looks good, as another option. Could we not use `d3.timeFormat`? https://github.com/mbostock/d3/wiki/Time-Formatting


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message