Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions lib/dart_debug_sample.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:intl/intl.dart';
class YukymController {

// DateTime.parse(_userData.value!.selectDate)
String nowDate = DateFormat('yyyy-mm-dd').format(DateTime.now());
String nowDate = DateFormat('yyyy-MM-dd').format(DateTime.now());

late String nowTime;

Expand Down Expand Up @@ -42,26 +42,30 @@ class YukymController {
String result = timeDataOne.first.ty12;

final nowTime = DateTime.now();
if (nowTime.hour >= 0 || nowTime.hour < 2) {
if (nowTime.hour >= 0 && nowTime.hour < 2) {
return timeDataOne.first.ty1;
} else if (nowTime.hour >= 4 || nowTime.hour < 6) {
} else if (nowTime.hour >= 2 && nowTime.hour < 4) {
return timeDataOne.first.ty2;
} else if (nowTime.hour >= 6 || nowTime.hour < 8) {
} else if (nowTime.hour >= 4 && nowTime.hour < 6) {
return timeDataOne.first.ty3;
} else if (nowTime.hour >= 8 || nowTime.hour < 10) {
} else if (nowTime.hour >= 6 && nowTime.hour < 8) {
return timeDataOne.first.ty4;
} else if (nowTime.hour >= 10 || nowTime.hour < 12) {
} else if (nowTime.hour >= 8 && nowTime.hour < 10) {
return timeDataOne.first.ty5;
} else if (nowTime.hour >= 12 || nowTime.hour < 14) {
} else if (nowTime.hour >= 10 && nowTime.hour < 12) {
return timeDataOne.first.ty6;
} else if (nowTime.hour >= 16 || nowTime.hour < 18) {
} else if (nowTime.hour >= 12 && nowTime.hour < 14) {
return timeDataOne.first.ty7;
} else if (nowTime.hour >= 18 || nowTime.hour < 20) {
} else if (nowTime.hour >= 14 && nowTime.hour < 16) {
return timeDataOne.first.ty8;
} else if (nowTime.hour >= 20 || nowTime.hour < 22) {
} else if (nowTime.hour >= 16 && nowTime.hour < 18) {
return timeDataOne.first.ty9;
} else if (nowTime.hour >= 22 || nowTime.hour < 24) {
} else if (nowTime.hour >= 18 && nowTime.hour < 20) {
return timeDataOne.first.ty10;
} else if (nowTime.hour >= 20 && nowTime.hour < 22) {
return timeDataOne.first.ty11;
} else if (nowTime.hour >= 22 && nowTime.hour < 24) {
return timeDataOne.first.ty12;
}

return result;
Expand Down