hamdown 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hamdown.rb +2 -2
- metadata +3 -3
data/lib/hamdown.rb
CHANGED
@@ -47,9 +47,9 @@ class Hamdown
|
|
47
47
|
lines = ''
|
48
48
|
source_lines.each do |line|
|
49
49
|
if line.match(/(\[:(.*):\])/)
|
50
|
-
if $2 == 'today'
|
50
|
+
if $2 == 'today' || ($2 == 'dynamic' && Time.now.hour <= 12)
|
51
51
|
line.gsub!($1, Time.now.strftime('%B %d, %Y'))
|
52
|
-
elsif $2 == 'tomorrow'
|
52
|
+
elsif $2 == 'tomorrow' || ($2 == 'dynamic' && Time.now.hour > 12)
|
53
53
|
line.gsub!($1, (Time.now + (24*60*60)).strftime('%B %d, %Y'))
|
54
54
|
end
|
55
55
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 17
|
10
|
+
version: 0.0.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert Fletcher
|