Permalink
Browse files

Add hours and minutes properties to each entry.

  • Loading branch information...
1 parent 7a0f86b commit bc26fafafacef1dc91f34b1006cf71d96ccc9646 @djwf djwf committed Dec 24, 2013
Showing with 20 additions and 0 deletions.
  1. +20 −0 acrylamid/readers.py
View
@@ -435,6 +435,26 @@ def day(self):
return '%02d' % self.iday
@property
+ def ihour(self):
+ """entry's hour as an integer"""
+ return self.date.hour
+
+ @property
+ def hour(self):
+ """entry's hour as zero padded string"""
+ return '%02d' % self.ihour
+
+ @property
+ def iminute(self):
+ """entry's minute as an integer"""
+ return self.date.minute
+
+ @property
+ def minute(self):
+ """entry's minute as zero padded string"""
+ return '%02d' % self.iminute
+
+ @property
def tags(self):
"""Tags applied to this entry, if any. If you set a single string it
is converted to an array containing this string."""

0 comments on commit bc26faf

Please sign in to comment.