Check-in [e93ae526ef]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix minor inaccuracy in the number of years in the human_readable_age() function.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e93ae526ef55b3cfda3f76dbe47aae5e08d49115e7b0785ec2a5bc33ea6d4aaa
User & Date: drh 2018-10-11 09:39:56
Context
2018-10-12
16:08
Alternative name for the "customskin" document in the document index. check-in: 2aa4ef940d user: drh tags: trunk
2018-10-11
16:36
Allow the hamburger menu to be closed instantly by pressing ESC or by clicking outside. This is the patch initially submitted to https://fossil-scm.org/forum/forumpost/2abe305c2d, with the interim changes incorporated. check-in: a44fdd17de user: florian tags: js-hamburger-menu
09:39
Fix minor inaccuracy in the number of years in the human_readable_age() function. check-in: e93ae526ef user: drh tags: trunk
2018-10-10
19:49
Applied a patch by forum user vor0nwe to allow the WYSIWYG wiki page editor to work in the face of the new CSP restrictions on inline JavaScript. The patch and explicit license for inclusion in Fossil are here: https://fossil-scm.org/forum/forumpost/6985a4754e check-in: 543cdd4770 user: wyoung tags: trunk
Changes

Changes to src/browse.c.

940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
  }else if( rAge*1440.0<90 ){
    return mprintf("%.1f minutes", rAge*1440.0);
  }else if( rAge*24.0<36 ){
    return mprintf("%.1f hours", rAge*24.0);
  }else if( rAge<365.0 ){
    return mprintf("%.1f days", rAge);
  }else{
    return mprintf("%.2f years", rAge/365.0);
  }
}

/*
** COMMAND: test-fileage
**
** Usage: %fossil test-fileage CHECKIN







|







940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
  }else if( rAge*1440.0<90 ){
    return mprintf("%.1f minutes", rAge*1440.0);
  }else if( rAge*24.0<36 ){
    return mprintf("%.1f hours", rAge*24.0);
  }else if( rAge<365.0 ){
    return mprintf("%.1f days", rAge);
  }else{
    return mprintf("%.2f years", rAge/365.2425);
  }
}

/*
** COMMAND: test-fileage
**
** Usage: %fossil test-fileage CHECKIN