[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:01914] palm2mhc: X-SC-Time 変換



開始時刻と終了時刻が同じときに
palm2mhcが
  X-SC-Time: 17:00-17:00
と変換してしまうので
  X-SC-Time: 17:00
とするパッチです。

Index: mhc-palm.rb
===================================================================
RCS file: /cvsroot/mhc/ruby-ext/lib/mhc-palm.rb,v
retrieving revision 1.9
diff -u -r1.9 mhc-palm.rb
--- mhc-palm.rb	29 Oct 2003 12:48:13 -0000	1.9
+++ mhc-palm.rb	9 Jun 2004 09:50:30 -0000
@@ -590,7 +590,13 @@
     xsc["Alarm"]      = alarm
     xsc["Day"]        = @exception .collect{|t| '!' + t .to_xscday} .join(' ')
     xsc["Day"]       += ' ' + @beg .to_xscday if !repeat?
-    xsc["Time"]  = ' ' + @beg .to_xsctime + '-' + @fin .to_xsctime if !event?
+    if !event?
+      if @beg .to_xsctime == @fin .to_xsctime
+        xsc["Time"]  = ' ' + @beg .to_xsctime
+      else
+        xsc["Time"]  = ' ' + @beg .to_xsctime + '-' + @fin .to_xsctime
+      end
+    end
 
     if repeat?
       if @repeatFrequency > 1

--
鯉江英隆 <hide@xxxxxxxx>