Esempio n. 1
0
 public static haxe.root.Date fromUTC(
     int year,
     int month,
     int day,
     java.lang.Object hour,
     java.lang.Object min,
     java.lang.Object sec,
     java.lang.Object millisec) {
   int __temp_millisec5 =
       (((millisec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(millisec)))));
   int __temp_sec4 = (((sec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(sec)))));
   int __temp_min3 = (((min == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(min)))));
   int __temp_hour2 =
       (((hour == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(hour)))));
   haxe.root.Date d =
       new haxe.root.Date(
           ((int) (year)),
           ((int) (month)),
           ((int) (day)),
           ((java.lang.Object) (__temp_hour2)),
           ((java.lang.Object) (__temp_min3)),
           ((java.lang.Object) (__temp_sec4)),
           ((java.lang.Object) (__temp_millisec5)));
   return haxe.root.Date.fromTime(
       ((((((double) (d.date.getTime())) / 1000) + d.timezoneOffset())) * 1000));
 }
Esempio n. 2
0
 public static java.lang.Object __hx_create(haxe.root.Array arr) {
   return new haxe.root.Date(
       ((int) (haxe.lang.Runtime.toInt(arr.__get(0)))),
       ((int) (haxe.lang.Runtime.toInt(arr.__get(1)))),
       ((int) (haxe.lang.Runtime.toInt(arr.__get(2)))),
       ((java.lang.Object) (arr.__get(3))),
       ((java.lang.Object) (arr.__get(4))),
       ((java.lang.Object) (arr.__get(5))),
       ((java.lang.Object) (arr.__get(6))));
 }
Esempio n. 3
0
  public int getPid() {
    if (haxe.root.Reflect.hasField(this.proc, "pid")) {
      return haxe.lang.Runtime.toInt(haxe.lang.Runtime.getField(this.proc, "pid", false));
    }

    return -1;
  }
Esempio n. 4
0
  public static void __hx_ctor__Date(
      haxe.root.Date __temp_me11,
      int year,
      int month,
      int day,
      java.lang.Object hour,
      java.lang.Object min,
      java.lang.Object sec,
      java.lang.Object millisec) {
    int __temp_millisec10 =
        (((millisec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(millisec)))));
    int __temp_sec9 = (((sec == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(sec)))));
    int __temp_min8 = (((min == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(min)))));
    int __temp_hour7 =
        (((hour == null)) ? (((int) (0))) : (((int) (haxe.lang.Runtime.toInt(hour)))));
    if ((year != 0)) {
      year = (year - 1900);
    } else {
      year = 0;
    }

    __temp_me11.date =
        new java.util.Date(
            ((int) (year)),
            ((int) (month)),
            ((int) (day)),
            ((int) (__temp_hour7)),
            ((int) (__temp_min8)),
            ((int) (__temp_sec9)));
    if ((__temp_millisec10 > 0)) {
      long __temp_stmt60 = 0L;
      {
        long a = __temp_me11.date.getTime();
        long b = 0L;
        {
          long i = 0L;
          i = ((long) (((((long) (0)) << 32) | (__temp_millisec10 & 0xffffffffL))));
          b = i;
        }

        __temp_stmt60 = ((long) ((((long) (a)) + ((long) (b)))));
      }

      __temp_me11.date = new java.util.Date(((long) (__temp_stmt60)));
    }
  }
Esempio n. 5
0
 public <T> void add(T x) {
   if (haxe.lang.Runtime.isInt(x)) {
     int x1 = ((int) (haxe.lang.Runtime.toInt(((java.lang.Object) (x)))));
     java.lang.Object xd = x1;
     this.b.append(((java.lang.Object) (xd)));
   } else {
     this.b.append(((java.lang.Object) (x)));
   }
 }
Esempio n. 6
0
  public static haxe.root.Date fromString(java.lang.String s, java.lang.Object isUtc) {
    boolean __temp_isUtc6 =
        (((isUtc == null)) ? (haxe.lang.Runtime.toBool(false)) : (haxe.lang.Runtime.toBool(isUtc)));
    int _g = s.length();
    switch (_g) {
      case 8:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, ":");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                0,
                0,
                1,
                haxe.root.Std.parseInt(k.__get(0)),
                haxe.root.Std.parseInt(k.__get(1)),
                haxe.root.Std.parseInt(k.__get(2)),
                null);
          } else {
            return new haxe.root.Date(
                ((int) (0)),
                ((int) (0)),
                ((int) (1)),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(0)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(1)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(k.__get(2)))),
                ((java.lang.Object) (null)));
          }
        }

      case 10:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, "-");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(0))))),
                (((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(1)))))
                    - ((int) (1))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(2))))),
                null,
                null,
                null,
                null);
          } else {
            return new haxe.root.Date(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(0))))),
                ((int)
                    ((((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(1)))))
                        - ((int) (1))))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(k.__get(2))))),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)),
                ((java.lang.Object) (null)));
          }
        }

      case 19:
        {
          haxe.root.Array<java.lang.String> k = haxe.lang.StringExt.split(s, " ");
          haxe.root.Array<java.lang.String> y = haxe.lang.StringExt.split(k.__get(0), "-");
          haxe.root.Array<java.lang.String> t = haxe.lang.StringExt.split(k.__get(1), ":");
          if (__temp_isUtc6) {
            return haxe.root.Date.fromUTC(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(0))))),
                (((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(1)))))
                    - ((int) (1))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(2))))),
                haxe.root.Std.parseInt(t.__get(0)),
                haxe.root.Std.parseInt(t.__get(1)),
                haxe.root.Std.parseInt(t.__get(2)),
                null);
          } else {
            return new haxe.root.Date(
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(0))))),
                ((int)
                    ((((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(1)))))
                        - ((int) (1))))),
                ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(y.__get(2))))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(0)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(1)))),
                ((java.lang.Object) (haxe.root.Std.parseInt(t.__get(2)))),
                ((java.lang.Object) (null)));
          }
        }

      default:
        {
          throw haxe.lang.HaxeException.wrap(("Invalid date format : " + s));
        }
    }
  }