class TDiary::TDiaryBase

Protected Instance Methods

blog_newdate( date ) { |recent| ... } click to toggle source
# File lib/tdiary/style/blog.rb, line 70
def blog_newdate( date )
        calendar
        year = @years.keys.sort[-1]
        if year then
                month = @years[year].sort[-1]
                if month then
                        @io.transaction( Time::local( year.to_i, month.to_i ) ) do |diaries|
                                recent = diaries.keys.sort[-1]
                                if date.strftime( '%Y%m%d' ) <= recent then
                                        yield( recent )
                                end
                                DIRTY_NONE
                        end
                end
        end
end