Skip to content

Commit c0d7d5f

Browse files
committed
fix: add清明节/提前三天提醒
1 parent 8362db8 commit c0d7d5f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

12306ForMac/Preferences/ReminderPreferenceViewController.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class ReminderPreferenceViewController: NSViewController,MASPreferencesViewContr
4949
//key,name,isLunar
5050
["01-01","元旦节",false],
5151
["02-14","情人节",false],
52+
["04-04","清明节",false],
5253
["05-01","劳动节",false],
5354
["05-05","端午节",true],
5455
["07-07","七夕节",true],
@@ -170,7 +171,7 @@ class ReminderPreferenceViewController: NSViewController,MASPreferencesViewContr
170171
else {
171172
date = DateComponents(calendar: lunarCal,year:lunarYear + 1, month: m, day: d).date!
172173
}
173-
reminderDate = date.addingTimeInterval(-3600*24*30)
174+
reminderDate = date.addingTimeInterval(-3600*24*33)
174175
}
175176

176177
ret.append(Festival2Reminder(name:name,date:date,reminderDate:reminderDate,shouldReminder:true))
@@ -187,7 +188,7 @@ class ReminderPreferenceViewController: NSViewController,MASPreferencesViewContr
187188

188189
var isSuccess:Bool?
189190
for item in festivalReminderInfos where item.shouldReminder {
190-
let eventTitle = "\(item.name) 火车票 预售提醒(明天预售)"
191+
let eventTitle = "\(item.name) 火车票 预售提醒"
191192
let startDate = item.reminderDate
192193
let endDate = startDate.addingTimeInterval(24*3600)
193194
isSuccess = CalendarManager.sharedInstance.createEvent(title:eventTitle,startDate:startDate,endDate:endDate)

12306ForMac/Preferences/ReminderPreferenceViewController.xib

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
</prototypeCellViews>
154154
</tableColumn>
155155
<tableColumn identifier="" width="116" minWidth="10" maxWidth="3.4028234663852886e+38" id="y1J-Rw-HDW">
156-
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="提醒日期(第二天预售)">
156+
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="提醒日期(提前三天)">
157157
<font key="font" metaFont="smallSystem"/>
158158
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
159159
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
@@ -229,7 +229,7 @@
229229
</subviews>
230230
</clipView>
231231
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="sLs-PQ-2AC">
232-
<rect key="frame" x="1" y="197" width="348" height="16"/>
232+
<rect key="frame" x="1" y="7" width="0.0" height="16"/>
233233
<autoresizingMask key="autoresizingMask"/>
234234
</scroller>
235235
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="Xpi-Be-66e">

0 commit comments

Comments
 (0)