sotfware_development:dart

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sotfware_development:dart [2023/05/03 08:57] prgramsotfware_development:dart [2025/07/07 14:12] (current) – external edit 127.0.0.1
Line 3: Line 3:
 https://dartpad.dev/ https://dartpad.dev/
  
 +===== 일반 =====
  
 <code java> <code java>
Line 466: Line 466:
 } }
 </code> </code>
 +
 +===== 날짜, 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: 60);
 +duration
 +duration.inDays
 +duration.inHours
 +duration.inMinutes
 +duration.inSeconds
 +duration.inMilliseconds
 +
 +
 +DateTime sepcificDay = DateTime(
 + 2023,11,23, //위 순서대로 
 +);
 +
 +final diff = now.difference(specificDay);
 +diff.inDays // ....
 +
 +now.isAfter(specificDay)
 +now.isBefore(specificDay)
 +
 +now.add(Duration(hours:10))
 +now.substract(Duration(seconds:20))
 +
 +
 +</code>
 +
  
 {{tag>sotfware_development dart language}} {{tag>sotfware_development dart language}}
  • sotfware_development/dart.1683104272.txt.gz
  • Last modified: 2025/07/07 14:12
  • (external edit)