fponticelli / thx.format

Formatting library for Haxe.
http://thx-lib.org
MIT License
21 stars 8 forks source link

DateFormat Type Error #19

Open 0b1kn00b opened 8 years ago

0b1kn00b commented 8 years ago

on Haxe commit #18faa39

thx.core 0.40.1

code:

timestamp.format("U");

error

0,5,1/src/thx/format/DateFormat.hx:342: characters 24-29 : thx.DateTimeUtc should be thx.DateTime
0,5,1/src/thx/format/DateFormat.hx:342: characters 24-29 : For function argument 'd'
0b1kn00b commented 8 years ago

git versions ok...

fponticelli commented 8 years ago

I will release a new version. Thank you.

mboussaa commented 8 years ago

Not yet updated @fponticelli ?

fponticelli commented 8 years ago

I want to solve this issue first: https://travis-ci.org/fponticelli/thx.format/jobs/128956075#L791 but I am not sure how to.

0b1kn00b commented 8 years ago

Those tests pass on ubuntu 14.04 in python 3.4.3. searchbrew doesn't tell me what version homebrew provides. [EDIT]. Ok so homebrew runs 3.5.1

Passing on 3.5.1 ubuntu. :/ can't help apple side.

fponticelli commented 8 years ago

They pass in 3.2.1 but there is some encoding issue in 3.3.0

0b1kn00b commented 8 years ago

master branch or development? Not getting errors with haxe#master.

fponticelli commented 8 years ago

Whatever travix uses by default :)

0b1kn00b commented 8 years ago

Ok, twas the development branch. Again here no errors, so either the bug has gone in the last month in the haxe compiler, or it is an apple specific thing, right? Is @frabbit aware of this?

fponticelli commented 8 years ago

I mentioned it on gitter and I think there is an issue open but not much development on there ... it is a really strange case. It might be a mac issue.

0b1kn00b commented 8 years ago

if I set:

# Generated by Haxe 3.3.0
#coding="utf8"

from here

I get:

File "bin/python.py", line 16494
_hx_fields = ["calendarWeekRuleIndex", "calendarWeekRuleName", "designatorAm", "designatorPm", "firstDayOfWeekIndex", "firstDayOfWeekName", "nameCalendar", "nameCalendarNative", "nameDays", "nameD
                                                                                                                                                                                                       ^
 SyntaxError: EOL while scanning string literal

so try setting, if you haven't already:

#coding="ascii"

fyi: syntax highlighting drops out in atom in the same area with some bizarro rules about what it will accept...

fponticelli commented 8 years ago

I was successful in adding that kind of prefix (or a similar one) but I would not how to do that from Haxe and post-processing the file seems unnecessarily complicated.

fponticelli commented 8 years ago

To be fair it also fails on linux

0b1kn00b commented 8 years ago

What exactly fails on linux?

looks like adding the prefix around here might do it.

fponticelli commented 8 years ago

c++ is failing in this case: https://travis-ci.org/fponticelli/thx.format/jobs/128956073#L1003

I am all to add the prefix if it works.