public class BlogPostsCalendar extends Object
Constructor and Description |
---|
BlogPostsCalendar(Date coversDate,
List blogPosts,
String spaceKey,
DateFormatter formatter)
Construct a new calendar.
|
Modifier and Type | Method and Description |
---|---|
String |
formatMonthYear() |
String |
getCurrentMonth()
Get the next year/month in the form yyyy/MM
|
int |
getDaysInMonth()
Gets the total number of days in the month being calendared.
|
BlogPost |
getFirstPostInNextMonth() |
BlogPost |
getLastPostInPreviousMonth() |
String |
getNextMonth()
Get the next year/month in the form yyyy/MM
|
List<BlogPost> |
getPostsForDay(int dayOfMonth)
Get the posts made on a particular day of the month
|
List<BlogPost> |
getPostsForMonth()
Get all the posts for the month
|
String |
getPreviousMonth()
Get the previous year/month in the form yyyy/MM
|
String |
getSpaceKey() |
int |
getStartingDayOfMonth()
Get the starting day of the month as an offset from Sunday (i.e.
|
void |
setFirstPostInNextMonth(BlogPost firstPostInNextMonth) |
void |
setLastPostInPreviousMonth(BlogPost lastPostInPreviousMonth) |
public BlogPostsCalendar(Date coversDate, List blogPosts, String spaceKey, DateFormatter formatter)
coversDate
- a date falling within the month being calendaredblogPosts
- the blog posts to populate the calendarspaceKey
- the space key to build the calendar forpublic int getDaysInMonth()
public int getStartingDayOfMonth()
public List<BlogPost> getPostsForDay(int dayOfMonth)
dayOfMonth
- the day of the month to get the posts for (starting at 1)public List<BlogPost> getPostsForMonth()
public String formatMonthYear()
public String getSpaceKey()
public String getPreviousMonth()
public String getNextMonth()
public String getCurrentMonth()
public void setLastPostInPreviousMonth(BlogPost lastPostInPreviousMonth)
public void setFirstPostInNextMonth(BlogPost firstPostInNextMonth)
public BlogPost getLastPostInPreviousMonth()
public BlogPost getFirstPostInNextMonth()
Copyright © 2003–2017 Atlassian. All rights reserved.