Home
last modified time | relevance | path

Searched refs:day (Results 1 – 25 of 70) sorted by relevance

123

/foundation/arkui/ace_engine/frameworks/core/components/calendar/
Dflutter_render_calendar.cpp230 const auto& day = calendarDays_[dateNumber++]; in DrawWeekAndDates() local
235 …rawCardCalendar(canvas, offset + Offset(0, NormalizeToPx(dateOffset)), dayOffset, day, dateNumber); in DrawWeekAndDates()
237 DrawTvCalendar(canvas, offset, dayOffset, day, dateNumber); in DrawWeekAndDates()
244 ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day, double x, double y) const in DrawFocusedArea() argument
265 if (day.dayMark == "work" && showHoliday_) { in DrawFocusedArea()
267 } else if (day.dayMark == "off" && showHoliday_) { in DrawFocusedArea()
327 …ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day, txt::TextStyle& textStyle) con… in PaintDay() argument
333 if (!day.dayMark.empty() && showHoliday_ && type_ == CalendarType::SIMPLE) { in PaintDay()
334 if (day.dayMark == "work") { in PaintDay()
336 } else if (day.dayMark == "off") { in PaintDay()
[all …]
Drosen_render_calendar.cpp238 const auto& day = calendarDays_[dateNumber++]; in DrawWeekAndDates() local
243 …rawCardCalendar(canvas, offset + Offset(0, NormalizeToPx(dateOffset)), dayOffset, day, dateNumber); in DrawWeekAndDates()
245 DrawTvCalendar(canvas, offset, dayOffset, day, dateNumber); in DrawWeekAndDates()
253 SkCanvas* canvas, const Offset& offset, const CalendarDay& day, double x, double y) const in DrawFocusedArea() argument
256 RSCanvas* canvas, const Offset& offset, const CalendarDay& day, double x, double y) const in DrawFocusedArea()
277 if (day.dayMark == "work" && showHoliday_) { in DrawFocusedArea()
279 } else if (day.dayMark == "off" && showHoliday_) { in DrawFocusedArea()
299 if (day.dayMark == "work" && showHoliday_) { in DrawFocusedArea()
301 } else if (day.dayMark == "off" && showHoliday_) { in DrawFocusedArea()
388 SkCanvas* canvas, const Offset& offset, const CalendarDay& day, txt::TextStyle& textStyle) const in PaintDay() argument
[all …]
Drosen_render_calendar.h51 …void DrawFocusedArea(SkCanvas* canvas, const Offset& offset, const CalendarDay& day, double x, dou…
57 RSCanvas* canvas, const Offset& offset, const CalendarDay& day, double x, double y) const;
63 …void PaintDay(SkCanvas* canvas, const Offset& offset, const CalendarDay& day, txt::TextStyle& text…
65 …SkCanvas* canvas, const Offset& offset, const CalendarDay& day, const txt::TextStyle& textStyle) c…
68 … RSCanvas* canvas, const Offset& offset, const CalendarDay& day, txt::TextStyle& textStyle) const;
69 void PaintLunarDay(RSCanvas* canvas, const Offset& offset, const CalendarDay& day,
72 …void SetNonFocusStyle(const CalendarDay& day, txt::TextStyle& dateTextStyle, txt::TextStyle& lunar…
75 …SkCanvas* canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day, int32_t d…
77 …SkCanvas* canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day, int32_t d…
80 const CalendarDay& day, int32_t dateNumber);
[all …]
Dflutter_render_calendar.h44 …void DrawFocusedArea(ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day, double x,…
49 …ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day, txt::TextStyle& textStyle) con…
51 …ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day, const txt::TextStyle& textStyl…
52 …void SetNonFocusStyle(const CalendarDay& day, txt::TextStyle& dateTextStyle, txt::TextStyle& lunar…
53 …lendar(ScopedCanvas& canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day,
55 …lendar(ScopedCanvas& canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day,
58 void PaintUnderscore(ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day);
59 void PaintScheduleMarker(ScopedCanvas& canvas, const Offset& offset, const CalendarDay& day);
61 …const CalendarDay& day, const Offset& offset, txt::TextStyle& workStateStyle, Rect& boxRect) const;
63 …const CalendarDay& day, SkColor workColor, SkColor offColor, txt::TextStyle& workStateStyle) const;
[all …]
Drender_calendar.cpp98 dateTime.day = static_cast<uint32_t>(today.day); in UpdateAccessibility()
196 CalendarDay day; in OnSelectedDay() local
198 day.index = lastDayIndex_; in OnSelectedDay()
200 day.index = selectedDayNumber_ + firstDayIndex_ - 1; in OnSelectedDay()
205 OnDateSelected(day); in OnSelectedDay()
297 calendarController_->GoToPrevMonth(onFocusDay.day); in FocusChanged()
301 calendarController_->GoToNextMonth(onFocusDay.day); in FocusChanged()
339 CalendarDay day; in HandleClick() local
340 day.index = index; in HandleClick()
341 OnDateSelected(day); in HandleClick()
[all …]
Dcalendar_controller_v2.h41 controller_->GoTo(today.month.year, today.month.month, today.day); in BackToToday()
45 void GoTo(int32_t year, int32_t month, int32_t day) in GoTo() argument
54 controller_->GoTo(year, month, day); in GoTo()
Dcalendar_data_adapter.cpp66 today_.day = static_cast<int32_t>(currentDate.day); in CalendarDataAdapter()
102 if (!ParseDayNumberProp(item, CalendarDay::DAY, dayInfo.day)) { in ParseData()
111 … if (dayInfo.day == CALENDAR_FIRST_DAY_NUM_OF_MONTH && result.firstDayIndex == CALENDAR_INVALID) { in ParseData()
122 dayInfo.today = dayInfo.month == today_.month && dayInfo.day == today_.day; in ParseData()
329 dayInfo.day = child->GetInt("day"); in ParseMonthData()
351 auto weekday = Date::CalculateWeekDay(dayInfo.month.year, dayInfo.month.month + 1, dayInfo.day); in SetOffDays()
355 for (const auto& day : days) { in SetOffDays() local
356 auto num = StringUtils::StringToInt(day); in SetOffDays()
438 dayInfo.day = startDay++; in FillPreMonthData()
456 dayInfo.day = i + 1; in FillCurrentMonthData()
[all …]
Dcalendar_component.cpp55 dataAdapter_->SetSelectedChanged(dataAdapter_->GetToday().day, TODAY_MONTH_INDEX_OF_CONTAINER); in Initialize()
146 void CalendarController::GoTo(int32_t year, int32_t month, int32_t day) in GoTo() argument
157 LOGD("go to: year=%{private}d, month=%{private}d, day=%{private}d", year, month, day); in GoTo()
162 GoToPrevMonth(day); in GoTo()
164 GoToNextMonth(day); in GoTo()
168 JumpToMonth(calendarMonth, day, SwipeDirection::PREV); in GoTo()
172 JumpToMonth(calendarMonth, day, SwipeDirection::NEXT); in GoTo()
174 dataAdapter_->SetSelectedChanged(day, currentMonthIndex_); in GoTo()
359 void CalendarComponent::GoTo(int32_t year, int32_t month, int32_t day) in GoTo() argument
361 if (day < 0) { in GoTo()
[all …]
Dcalendar_data_adapter.h113 int32_t day = 0; member
146 json->Put(DAY, day); in ToString()
296 today_.day = today.day; in SetToday()
486 inline bool StringToCalendarDay(const std::string& str, CalendarDay& day) in StringToCalendarDay() argument
491 day.month.year = date[0]; in StringToCalendarDay()
492 day.month.month = date[1] - 1; in StringToCalendarDay()
493 day.day = date[2]; in StringToCalendarDay()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/calendar/
Dcalendar_paint_method.cpp150 const auto& day = calendarDays_[dateNumber++]; in DrawWeekAndDates() local
154 DrawCalendar(canvas, offset, dayOffset, day); in DrawWeekAndDates()
161 RSCanvas& canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day) in DrawCalendar() argument
174 SetCalendarPickerDayTextStyle(dateTextStyle, day); in DrawCalendar()
175 DrawCalendarPickerBackgroundArea(day, canvas, x, y); in DrawCalendar()
178 PaintDay(canvas, dateNumberOffset, day, dateTextStyle); in DrawCalendar()
183 SetDayTextStyle(dateTextStyle, lunarTextStyle, day); in DrawCalendar()
185 if (day.focused && day.month.month == currentMonth_.month) { in DrawCalendar()
186 if (IsToday(day)) { in DrawCalendar()
193 if (showLunar_ && !day.lunarDay.empty()) { in DrawCalendar()
[all …]
Dcalendar_pattern.cpp220 void CalendarPattern::FireGoToRequestData(int32_t year, int32_t month, int32_t day) in FireGoToRequestData() argument
222 LOGI("Jump to date %{public}d-%{public}d-%{public}d.", year, month, day); in FireGoToRequestData()
234 goToCalendarDay_ = day; in FireGoToRequestData()
242 for (auto& day : obtainedMonth.days) { in JumpTo() local
243 if (day.month.year == goToCalendarYear_ && day.month.month == goToCalendarMonth_ && in JumpTo()
244 day.day == goToCalendarDay_) { in JumpTo()
245 day.focused = true; in JumpTo()
247 day.focused = false; in JumpTo()
328 for (auto& day : obtainedMonth.days) { in FlushFocus() local
329day.focused = day.month.year == calendarDay_.month.year && day.month.month == calendarDay_.month.m… in FlushFocus()
[all …]
Dcalendar_month_pattern.h81 for (auto& day : obtainedMonth_.days) { in SetCalendarDay()
82 … if (day.month.year == calendarDay.month.year && day.month.month == calendarDay.month.month && in SetCalendarDay()
83 day.day == calendarDay.day) { in SetCalendarDay()
84 day.focused = true; in SetCalendarDay()
Dcalendar_paint_method.h47 …wCalendar(RSCanvas& canvas, const Offset& offset, const Offset& dayOffset, const CalendarDay& day);
50 …void DrawCalendarPickerBackgroundArea(const CalendarDay& day, RSCanvas& canvas, double x, double y…
52 …d SetDayTextStyle(RSTextStyle& dateTextStyle, RSTextStyle& lunarTextStyle, const CalendarDay& day);
53 void SetCalendarPickerDayTextStyle(RSTextStyle& dateTextStyle, const CalendarDay& day);
54 void SetOffWorkTextStyle(RSTextStyle& offWorkTextStyle, const CalendarDay& day) const;
55 …void PaintDay(RSCanvas& canvas, const Offset& offset, const CalendarDay& day, RSTextStyle& textSty…
57 …RSCanvas& canvas, const Offset& offset, const CalendarDay& day, const RSTextStyle& textStyle) cons…
60 bool IsToday(const CalendarDay& day) const;
Dcalendar_controller_ng.cpp31 void CalendarControllerNg::GoTo(int32_t year, int32_t month, int32_t day) in GoTo() argument
36 LOGD("go to: year=%{private}d, month=%{private}d, day=%{private}d", year, month, day); in GoTo()
37 calendarPattern->FireGoToRequestData(year, month, day); in GoTo()
Dcalendar_controller_model_ng.cpp32 void CalendarControllerModelNG::GoTo(const int32_t& year, const int32_t& month, const int32_t& day, in GoTo() argument
38 controllerNG->GoTo(year, month, day); in GoTo()
/foundation/arkui/ace_engine/frameworks/base/utils/
Ddate_util.cpp33 date.day = static_cast<uint32_t>(local->tm_mday); in Current()
45 int32_t day = 0; in DayOfMonth() local
54 day = 31; in DayOfMonth()
60 day = 30; in DayOfMonth()
63 day = IsLeapYear(year) ? 29 : 28; in DayOfMonth()
66 day = 0; in DayOfMonth()
68 return day; in DayOfMonth()
71 int32_t Date::CalculateWeekDay(int32_t year, int32_t month, int32_t day) in CalculateWeekDay() argument
79 return (day + 2 * month + 3 * (month + 1) / 5 + year + year / 4 - year / 100 + year / 400) % 7; in CalculateWeekDay()
Ddate_util.h26 Date(uint32_t year, uint32_t month, uint32_t day) : year(year), month(month), day(day) {} in Date()
32 static int32_t CalculateWeekDay(int32_t year, int32_t month, int32_t day);
37 uint32_t day = 1; member
/foundation/arkui/ace_engine/frameworks/core/components/picker/
Dpicker_data.cpp78 date.day = day_; in ToString()
260 for (uint32_t day = 1; day <= 31; ++day) { in Init() local
262 date.day = day; in Init()
263 …solarDays_[day - 1] = Localization::GetInstance()->FormatDateTime(date, "d"); // index start from 0 in Init()
272 for (uint32_t day = 1; day <= 30; ++day) { in Init() local
273 lunarDays_[day - 1] = Localization::GetInstance()->GetLunarDay(day); // index start from 0 in Init()
297 const std::string& PickerStringFormatter::GetSolarDay(uint32_t day) in GetSolarDay() argument
300 if (!(1 <= day && day <= 31)) { // solar day in [1,31] in GetSolarDay()
303 return solarDays_[day - 1]; // index in [0,30] in GetSolarDay()
316 const std::string& PickerStringFormatter::GetLunarDay(uint32_t day) in GetLunarDay() argument
[all …]
Dpicker_date_component.cpp186 lunarResult.day = dayColumn->GetCurrentIndex() + 1; // day start form 1, index start from 0 in GetCurrentLunarDate()
225 if (lunarDate.day > nowMaxDay) { in HandleLunarYearChange()
226 lunarDate.day = nowMaxDay; in HandleLunarYearChange()
287 if (lunarDate.day > maxDay) { in HandleLunarMonthChange()
288 lunarDate.day = maxDay; in HandleLunarMonthChange()
444 lunarDate.day = GetLunarMaxDay(lunarDate.year, lunarDate.month, lunarDate.isLeapMonth); in HandleReduceLunarDayChange()
456 lunarDate.day = GetLunarMaxDay(lunarDate.year, lunarDate.month, lunarDate.isLeapMonth); in HandleReduceLunarDayChange()
478 std::string PickerDateComponent::GetDayFormatString(uint32_t day, bool isLunar) const in GetDayFormatString() argument
481 return PickerStringFormatter::GetLunarDay(day); in GetDayFormatString()
484 return PickerStringFormatter::GetSolarDay(day); in GetDayFormatString()
[all …]
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
Djs_calendar.cpp109 CalendarDay day; in Create() local
110 day.month.year = yearValue->ToNumber<int32_t>(); in Create()
111 day.month.month = monthValue->ToNumber<int32_t>(); in Create()
112 day.day = dayValue->ToNumber<int32_t>(); in Create()
114 calendarData.date = day; in Create()
155 CalendarDay day; in SetCalendarData() local
156 day.index = child->GetInt("index"); in SetCalendarData()
157 day.lunarMonth = child->GetString("lunarMonth"); in SetCalendarData()
158 day.lunarDay = child->GetString("lunarDay"); in SetCalendarData()
159 day.dayMark = child->GetString("dayMark"); in SetCalendarData()
[all …]
Djs_calendar_controller.cpp85 int32_t day = 0; in GoTo() local
88 ConvertFromJSValue(obj->GetProperty("day"), day); in GoTo()
89 CalendarControllerModel::GetInstance()->GoTo(year, month, day, controller_); in GoTo()
/foundation/arkui/ace_engine/frameworks/core/components_ng/test/pattern/calendar/
Dcalendar_pattern_test_ng.cpp310 calendarDay.day = DAY_VALUE;
340 EXPECT_EQ(pattern->GetCalendarDay().day, DAY_VALUE);
407 CalendarDay day; variable
408 day.index = i;
409 day.month.year = JUMP_YEAR;
410 day.month.month = JUMP_MONTH;
411 day.day = i + 1;
413 day.focused = true;
415 days.emplace_back(std::move(day));
425 calendarDay.day = DAY_VALUE;
[all …]
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/calendar_picker/
Dcalendar_dialog_pattern.cpp431 [currentMonthData](const CalendarDay& day) { in HandleCalendarNodeKeyEvent() argument
432 … return day.month.year == currentMonthData.year && day.month.month == currentMonthData.month; in HandleCalendarNodeKeyEvent()
443 [currentMonthData](const CalendarDay& day) { in HandleCalendarNodeKeyEvent() argument
444 … return day.month.year == currentMonthData.year && day.month.month == currentMonthData.month; in HandleCalendarNodeKeyEvent()
456 … PickerDate selectedDay(focusedDay_.month.year, focusedDay_.month.month, focusedDay_.day); in HandleCalendarNodeKeyEvent()
504 if (focusedDay_.day < 0) { in FocusedLastFocusedDay()
508 focusedDay_.day = static_cast<int32_t>(selectedDay.GetDay()); in FocusedLastFocusedDay()
521 [this](CalendarDay day) { in FocusedLastFocusedDay() argument
522 return day.day == focusedDay_.day && day.month == focusedDay_.month; in FocusedLastFocusedDay()
574 [focusedDay](CalendarDay day) { in UpdateSwiperNodeFocusedDay() argument
[all …]
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/picker/
Ddatepicker_pattern.cpp406 auto day = *iter; in GetAllChildNode() local
407 CHECK_NULL_RETURN(day, allChildNode); in GetAllChildNode()
412 auto stackDay = DynamicCast<FrameNode>(day); in GetAllChildNode()
734 lunarDate.day = GetLunarMaxDay(lunarDate.year, lunarDate.month, lunarDate.isLeapMonth); in HandleReduceLunarDayChange()
746 lunarDate.day = GetLunarMaxDay(lunarDate.year, lunarDate.month, lunarDate.isLeapMonth); in HandleReduceLunarDayChange()
934 lunarDate.day = GetLunarMaxDay(lunarDate.year, lunarDate.month, lunarDate.isLeapMonth); in HandleReduceLunarMonthDaysChange()
1037 if (lunarDate.day > maxDay) { in HandleLunarMonthChange()
1038 lunarDate.day = maxDay; in HandleLunarMonthChange()
1066 if (lunarDate.day > nowMaxDay) { in HandleLunarYearChange()
1067 lunarDate.day = nowMaxDay; in HandleLunarYearChange()
[all …]
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/
Dcalendar_controller_model_impl.cpp32 …id CalendarControllerModelImpl::GoTo(const int32_t& year, const int32_t& month, const int32_t& day, in GoTo() argument
38 controllerV2->GoTo(year, month, day); in GoTo()

123