How can I get the current date (w/o hour and minutes)?

前端 未结 7 1586
攒了一身酷
攒了一身酷 2020-12-05 12:33

All I can see in the documentation is Datetime.now() but it returns the Timespan, I need just the date.

7条回答
  •  暖寄归人
    2020-12-05 13:08

    first go to pub.dev and get the intl package and add it to your project.

    DateFormat.yMMMMd().format(the date you want to render . but must have the type DateTime)

提交回复
热议问题