//
//  DOWebPublishDate.h
//  DOCore
//
//  Created by Ben Dolman on 10/2/13.
//
//

#import <DOCore/DOWebObject.h>
#import <DOCore/DOJournalEntryFile.h>

@interface DOWebPublishDate : DOWebObject <MTLManagedObjectSerializing>

@property (nonatomic, copy) NSDate *date;
@property (nonatomic, copy) NSTimeZone *timeZone;

+ (instancetype)now;

/**
 * Initializes the object with the creationDate of the entry file.
 * Returns nil if entryFile is nil or the file does not contain a creationDate.
 */
- (instancetype)initWithEntryFile:(DOJournalEntryFile *)entryFile;

- (instancetype)initWithDateInCurrentTimezone:(NSDate *)date;

- (instancetype)initWithDate:(NSDate *)date inTimezone:(NSTimeZone *)timeZone;

@end
