@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2022 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -13,11 +13,10 @@ * file. */ #import "OFObject.h" #import "OFMessagePackRepresentation.h" -#import "OFSerialization.h" OF_ASSUME_NONNULL_BEGIN @class OFString; @class OFConstantString; @@ -25,19 +24,12 @@ /** * @class OFDate OFDate.h ObjFW/OFDate.h * * @brief A class for storing, accessing and comparing dates. */ -#ifndef OF_DATE_M -OF_SUBCLASSING_RESTRICTED -#endif -@interface OFDate: OFObject -{ - OFTimeInterval _seconds; -} - #ifdef OF_HAVE_CLASS_PROPERTIES @property (class, readonly, nonatomic) OFDate *distantFuture; @property (class, readonly, nonatomic) OFDate *distantPast; #endif @@ -281,10 +273,14 @@ /** * @brief Creates a string of the date with the specified format. * * See the man page for `strftime` for information on the format. + * + * @warning The format is currently limited to the following format specifiers: + * %%a, %%b, %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%z, %%, %%n and + * %%t. * * @param format The format for the date string * @return A new, autoreleased OFString * @throw OFInvalidFormatException The specified format is invalid */ @@ -292,10 +288,14 @@ /** * @brief Creates a string of the local date with the specified format. * * See the man page for `strftime` for information on the format. + * + * @warning The format is currently limited to the following format specifiers: + * %%a, %%b, %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%z, %%, %%n and + * %%t. * * @param format The format for the date string * @return A new, autoreleased OFString * @throw OFInvalidFormatException The specified format is invalid */