Skip to content

Commit

Permalink
Fixed off by one error for dates in the last week
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillula committed Jun 23, 2019
1 parent cf6845f commit 7c911b5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions make-xpi-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# First get the version number directly from the install.rdf file
version_number=`sed -n -e 's|.*<em:version>\(.*\)</em:version>|\1|p' src/install.rdf`

# Go into the source directory...
cd src

# Delete any extraneous files
find . -name *~ -delete

# And make the xpi file by zipping stuff up!
zip -r ../enhanced_date_formatter-$version_number-tb.xpi *
2 changes: 1 addition & 1 deletion src/chrome/content/enhancedDateFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EnhancedDateFormatter.getDateFormatForDate = function (date) {
var dateDay = Math.floor(date.valueOf()/86400000);

if (EnhancedDateFormatter.preferences.getValue('useCustomFormatForLastWeek', false) &&
dateDay > (todayDay-7)) {
dateDay > (todayDay-6)) {
dateFormat = EnhancedDateFormatter.preferences.getValue('lastWeekDateFormat', '');
}
if (EnhancedDateFormatter.preferences.getValue('useCustomFormatForYesterday', false) &&
Expand Down
2 changes: 1 addition & 1 deletion src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<Description about="urn:mozilla:install-manifest">
<em:id>enhanceddateformatter@jeremy.gillula</em:id>
<em:version>0.1</em:version>
<em:version>1.0.0</em:version>
<em:type>2</em:type>
<em:targetApplication>
<Description>
Expand Down

0 comments on commit 7c911b5

Please sign in to comment.