Lines Matching refs:fold
477 check_time_args(int h, int m, int s, int us, int fold)
499 if (fold != 0 && fold != 1) {
501 "fold must be either 0 or 1");
989 int second, int usecond, PyObject *tzinfo, int fold, PyTypeObject *type)
997 if (check_time_args(hour, minute, second, usecond, fold) < 0) {
1016 DATE_SET_FOLD(self, fold);
1029 #define new_datetime(y, m, d, hh, mm, ss, us, tzinfo, fold) \
1030 new_datetime_ex2(y, m, d, hh, mm, ss, us, tzinfo, fold, \
1036 int fold, PyObject *cls) {
1041 tzinfo, fold);
1070 PyObject *tzinfo, int fold, PyTypeObject *type)
1075 if (check_time_args(hour, minute, second, usecond, fold) < 0) {
1094 TIME_SET_FOLD(self, fold);
1106 #define new_time(hh, mm, ss, us, tzinfo, fold) \
1107 new_time_ex2(hh, mm, ss, us, tzinfo, fold, &PyDateTime_TimeType)
1376 /* repr is like "someclass(arg1, arg2)". If fold isn't 0,
1378 * ", fold=" + repr(tzinfo)
1382 append_keyword_fold(PyObject *repr, int fold)
1387 if (fold == 0)
1395 repr = PyUnicode_FromFormat("%U, fold=%d)", temp, fold);
4194 {"fold", (getter)time_fold},
4203 "tzinfo", "fold", NULL};
4229 me->fold = 1;
4232 me->fold = 0;
4247 int fold = 0;
4290 &tzinfo, &fold)) {
4291 self = new_time_ex2(hour, minute, second, usecond, tzinfo, fold,
4342 int fold = TIME_GET_FOLD(self);
4355 if (result != NULL && fold)
4356 result = append_keyword_fold(result, fold);
4605 int fold = TIME_GET_FOLD(self);
4609 &hh, &mm, &ss, &us, &tzinfo, &fold))
4611 if (fold != 0 && fold != 1) {
4613 "fold must be either 0 or 1");
4621 TIME_SET_FOLD(clone, fold);
4869 {"fold", (getter)datetime_fold},
4879 "microsecond", "tzinfo", "fold", NULL
4906 me->fold = 1;
4909 me->fold = 0;
4926 int fold = 0;
4970 &second, &usecond, &tzinfo, &fold)) {
4973 tzinfo, fold, type);
4982 /* As of version 2015f max fold in IANA database is
5035 int year, month, day, hour, minute, second, fold = 0;
5053 /* local timezone requires to compute fold */
5058 * means that fold detection for time values between
5061 * fold. However, since we know there haven't been any
5063 * timezone, we can hackily just forego fold detection
5078 /* Probe max_fold_seconds to detect a fold. */
5088 fold = 1;
5092 second, us, tzinfo, fold, cls);
5854 * on the value of its fold attribute, the result is False.
6061 int fold = DATE_GET_FOLD(self);
6066 &tzinfo, &fold))
6068 if (fold != 0 && fold != 1) {
6070 "fold must be either 0 or 1");
6078 DATE_SET_FOLD(clone, fold);
6177 int hour, int minute, int second, int fold);
6329 int hour, int minute, int second, int fold)
6344 * Look for an earlier solution (if `fold` is 0), or a
6345 * later one (if `fold` is 1). */
6346 if (fold)
6371 return fold?Py_MIN(u1, u2):Py_MAX(u1, u2);