[Sugar-devel] [PATCH Moon] today's date is displayed in the information panel fix to SL#2749

callkalpa at gmail.com callkalpa at gmail.com
Fri Mar 16 16:07:53 EDT 2012


From: Kalpa Pathum Welivitigoda <callkalpa at gmail.com>

---
 moon.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/moon.py b/moon.py
index f9eca9d..6f9eecf 100755
--- a/moon.py
+++ b/moon.py
@@ -36,6 +36,7 @@ from sugar.graphics.toggletoolbutton import ToggleToolButton
 from gettext import gettext as _
 import math
 import time
+import datetime
 import os
 
 try:
@@ -247,6 +248,7 @@ class MoonActivity(activity.Activity):
         """
         self.data_model.update_moon_calculations(time.time())
         information_string = ""
+        information_string += _("Today is:\n%s\n\n") % (datetime.datetime.now().strftime('%x'))
         information_string += _("Today's Moon Information\n\n")
         information_string += _("Phase:\n%s\n\n") % (self.data_model.moon_phase_name(self.data_model.phase_of_moon))
         information_string += _("Julian Date:\n%.2f (astronomical)\n\n") % (self.data_model.julian_date)
-- 
1.7.7.6



More information about the Sugar-devel mailing list