persian_date 0.1.3 copy "persian_date: ^0.1.3" to clipboard
persian_date: ^0.1.3 copied to clipboard

outdated

This library is Used For Jalali Date, Developer with this library can convert Gregorian date to Jalali date

example/persian_date_example.dart

import 'package:persian_date/persian_date.dart';

main() {

  PersianDate persianDate = PersianDate(gregorian: "1989-08-21");
  //PersianDate persianDate = PersianDate(gregorian: "1989-01-29");

  print("Date ${persianDate.getDate}");

  PersianDate getDate = PersianDate();
  print("Now ${getDate.now}");
  print(getDate.hour);
  print("year ${getDate.year}");
  print("isHoliday ${getDate.isHoliday}");
  print("weekdayname ${getDate.weekdayname}");
  print(getDate.monthname); // نام ماه
  print(getDate.month); // ماه
  print(getDate.day); // روز
  print(getDate.hour);// ساعت
  print(getDate.minute);// دقیقه
  print(getDate.second);// ثانیه
  print(getDate.millisecond); // میلی ثانیه
  print(getDate.microsecond);//



  print(getDate.jalaliToGregorian(1368, 05, 30)); // تبدیل تاریخ شمسی به میلادی اگر جدا کننده نداشته باشه به صورت یک لیست بر میگرداند

  var now = new DateTime.now();
  print("Now in Gorgey TO Format ${getDate.parseToFormat(now.toString(),"yyyy-m-d")}");
  print("Parse TO Format ${getDate.parseToFormat("2019-02-20T00:19:54.000Z","yyyy-m-d hh:nn")}");
}
23
likes
0
pub points
64%
popularity

Publisher

verified publisherflutterfarsi.ir

This library is Used For Jalali Date, Developer with this library can convert Gregorian date to Jalali date

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on persian_date