Giter VIP home page Giter VIP logo

Comments (5)

FatulM avatar FatulM commented on June 7, 2024

Hi,
I've checked this:

final g = Gregorian(2124, 3, 20);
final j = g.toJalali();
print('$g == $j');

this will print:

Gregorian(2124, 3, 20, 0, 0, 0, 0) == Jalali(1502, 12, 30, 0, 0, 0, 0)

from shamsi_date.

FatulM avatar FatulM commented on June 7, 2024

if you check time.ir site date conversion, it says that it is correct.

from shamsi_date.

eshahrvand avatar eshahrvand commented on June 7, 2024

time.ir has some issues for this date:
please, check the leap year rule and the the test set that Roozbeh provided.

from shamsi_date.

FatulM avatar FatulM commented on June 7, 2024

the last line included in the file that you mentioned is

1498* 2119-03-21

so no info about 2124.

from shamsi_date.

FatulM avatar FatulM commented on June 7, 2024

with this simple code:

import 'package:shamsi_date/shamsi_date.dart';

void main() {
  for (int jy = 1206; jy <= 1498; jy++) {
    var j = Jalali(jy);
    var jf = j.formatter;
    var g = j.toGregorian();
    var gf = g.formatter;

    var s = StringBuffer();
    s.write(jf.yyyy);
    if (j.isLeapYear()) {
      s.write("*");
    }
    s.write(" ${gf.yyyy}-${gf.mm}-${gf.dd}");

    print(s);
  }
}

if you compare the output and the file provided by Roozbeh,
you can see that (aprt from ** s in the file, which i will output * s in place of them),
the contents are equal.

from shamsi_date.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.