Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sotfware_development:dart [2023/05/03 08:57] – prgram | sotfware_development:dart [2025/07/07 14:12] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
https:// | https:// | ||
+ | ===== 일반 ===== | ||
<code java> | <code java> | ||
Line 466: | Line 466: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ===== 날짜, Duration ==== | ||
+ | <code java> | ||
+ | DateTime now = DateTime.now(); | ||
+ | |||
+ | now | ||
+ | now.year | ||
+ | now.month | ||
+ | now.day | ||
+ | now.hour | ||
+ | now.minute | ||
+ | now.second | ||
+ | now.millisecond | ||
+ | |||
+ | Duration duration = Duration(seconds: | ||
+ | duration | ||
+ | duration.inDays | ||
+ | duration.inHours | ||
+ | duration.inMinutes | ||
+ | duration.inSeconds | ||
+ | duration.inMilliseconds | ||
+ | |||
+ | |||
+ | DateTime sepcificDay = DateTime( | ||
+ | 2023, | ||
+ | ); | ||
+ | |||
+ | final diff = now.difference(specificDay); | ||
+ | diff.inDays // .... | ||
+ | |||
+ | now.isAfter(specificDay) | ||
+ | now.isBefore(specificDay) | ||
+ | |||
+ | now.add(Duration(hours: | ||
+ | now.substract(Duration(seconds: | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
{{tag> | {{tag> |