Package org.dmlite.type.time

Examples of org.dmlite.type.time.EasyDate


    try {
      if (super.postUpdate(beforeEntity, afterEntity)) {
        Link afterLink = (Link) afterEntity;
        Date today = new Date();
        Date updateDate = afterLink.getUpdateDate();
        EasyDate easyToday = new EasyDate(today);
        EasyDate easyUpdateDate = new EasyDate(updateDate);
        if (!easyToday.equals(easyUpdateDate)) {
          Link afterAfterEntity = (Link) afterLink.copy();
          afterAfterEntity.setUpdateDate(today);
          post = update(afterEntity, afterAfterEntity);
        }
View Full Code Here


   *
   * @return selected links
   */
  public Links getLastMonthLinks() {
    Date date = new Date();
    EasyDate easyDate = new EasyDate(date);
    return getRecentlyCreatedLinks(easyDate.getPreviousMonthDate());
  }
View Full Code Here

   *
   * @return selected links
   */
  public Links getTodayLinks() {
    Date date = new Date();
    EasyDate easyToday = new EasyDate(date);
    Date yesterday = easyToday.getPreviousDayDate();
    EasyDate easyYesterday = new EasyDate(yesterday);
    return getRecentlyCreatedLinks(easyYesterday);
  }
View Full Code Here

    try {
      if (super.postUpdate(beforeEntity, afterEntity)) {
        Entry afterBlogEntry = (Entry) afterEntity;
        Date today = new Date();
        Date updateDate = afterBlogEntry.getUpdateDate();
        EasyDate easyToday = new EasyDate(today);
        EasyDate easyUpdateDate = new EasyDate(updateDate);
        if (!easyToday.equals(easyUpdateDate)) {
          Entry afterAfterEntity = (Entry) afterBlogEntry.copy();
          afterAfterEntity.setUpdateDate(today);
          post = update(afterEntity, afterAfterEntity);
        }
View Full Code Here

    return recentlyCreatedBlogEntries;
  }

  public Entries getLastMonthEntries() {
    Date date = new Date();
    EasyDate easyDate = new EasyDate(date);
    return getRecentlyCreatedEntries(easyDate.getPreviousMonthDate());
  }
View Full Code Here

    return getRecentlyCreatedEntries(easyDate.getPreviousMonthDate());
  }

  public Entries getTodayEntries() {
    Date date = new Date();
    EasyDate easyToday = new EasyDate(date);
    Date yesterday = easyToday.getPreviousDayDate();
    EasyDate easyYesterday = new EasyDate(yesterday);
    return getRecentlyCreatedEntries(easyYesterday);
  }
View Full Code Here

    try {
      if (super.postUpdate(beforeEntity, afterEntity)) {
        Spiral afterSpiral = (Spiral) afterEntity;
        Date today = new Date();
        Date updateDate = afterSpiral.getUpdateDate();
        EasyDate easyToday = new EasyDate(today);
        EasyDate easyUpdateDate = new EasyDate(updateDate);
        if (!easyToday.equals(easyUpdateDate)) {
          Spiral afterAfterEntity = (Spiral) afterSpiral.copy();
          afterAfterEntity.setUpdateDate(today);
          post = update(afterEntity, afterAfterEntity);
        }
View Full Code Here

   *
   * @return selected spirals
   */
  public Spirals getLastMonthSpirals() {
    Date date = new Date();
    EasyDate easyDate = new EasyDate(date);
    return getRecentlyCreatedSpirals(easyDate.getPreviousMonthDate());
  }
View Full Code Here

   *
   * @return selected spirals
   */
  public Spirals getTodaySpirals() {
    Date date = new Date();
    EasyDate easyToday = new EasyDate(date);
    Date yesterday = easyToday.getPreviousDayDate();
    EasyDate easyYesterday = new EasyDate(yesterday);
    return getRecentlyCreatedSpirals(easyYesterday);
  }
View Full Code Here

TOP

Related Classes of org.dmlite.type.time.EasyDate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.