Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions .github/workflows/intl4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
sdk: main

- run: dart pub get
- run: dart pub get --example

- run: dart analyze --fatal-infos

Expand All @@ -45,22 +45,19 @@ jobs:

- run: dart test -p chrome

- run: dart pub get
working-directory: pkgs/intl4x/example_native

- run: dart --enable-experiment=record-use build cli bin/example_native.dart
working-directory: pkgs/intl4x/example_native
- run: dart --enable-experiment=record-use build cli bin/example.dart
working-directory: pkgs/intl4x/example

- run: tree . -a
if: matrix.os == 'ubuntu-latest'

- name: Run example_native (Linux)
working-directory: pkgs/intl4x/example_native
- name: Run example (Linux)
working-directory: pkgs/intl4x/example
if: matrix.os == 'ubuntu-latest'
run: ./build/cli/linux_x64/bundle/bin/example_native
run: ./build/cli/linux_x64/bundle/bin/example

- name: Print file size and check limit for example_native (Linux)
working-directory: pkgs/intl4x/example_native
- name: Print file size and check limit for example (Linux)
working-directory: pkgs/intl4x/example
if: matrix.os == 'ubuntu-latest'
run: |
FILE_PATH="build/cli/linux_x64/bundle/lib/libicu4x.so"
Expand All @@ -71,13 +68,13 @@ jobs:
exit 1
fi

- name: Run example_native (Mac)
working-directory: pkgs/intl4x/example_native
- name: Run example (Mac)
working-directory: pkgs/intl4x/example
if: matrix.os == 'macos-latest'
run: ./build/cli/macos_arm64/bundle/bin/example_native
run: ./build/cli/macos_arm64/bundle/bin/example

- name: Print file size and check limit for example_native (Mac)
working-directory: pkgs/intl4x/example_native
- name: Print file size and check limit for example (Mac)
working-directory: pkgs/intl4x/example
if: matrix.os == 'macos-latest'
run: |
FILE_PATH="build/cli/macos_arm64/bundle/lib/libicu4x.dylib"
Expand All @@ -88,12 +85,12 @@ jobs:
exit 1
fi

- name: Run example_native (Windows)
working-directory: pkgs/intl4x/example_native
- name: Run example (Windows)
working-directory: pkgs/intl4x/example
if: matrix.os == 'windows-latest'
run: .\build\cli\windows_x64\bundle\bin\example_native.exe
- name: Print file size and check limit for example_native (Windows)
working-directory: pkgs/intl4x/example_native
run: .\build\cli\windows_x64\bundle\bin\example.exe
- name: Print file size and check limit for example (Windows)
working-directory: pkgs/intl4x/example
if: matrix.os == 'windows-latest'
run: |
$filePath = ".\build\cli\windows_x64\bundle\lib\icu4x.dll"
Expand Down
1 change: 1 addition & 0 deletions pkgs/intl4x/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Make package compatible to run on Windows again.
- Update to `native_toolchain_c` v0.17.1.
- Move logic to package:icu4x.
- Switch `DateTime` formatting API and more clean-ups.

## 0.12.2

Expand Down
1 change: 1 addition & 0 deletions pkgs/intl4x/example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
build/
1 change: 0 additions & 1 deletion pkgs/intl4x/example/README.md

This file was deleted.

21 changes: 21 additions & 0 deletions pkgs/intl4x/example/bin/example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:intl4x/datetime_format.dart';
import 'package:intl4x/intl4x.dart';

void main(List<String> arguments) {
const timeZone = TimeZone(name: 'Europe/Paris', offset: Duration(hours: 2));
final dateTime = DateTime.parse('2024-07-01T08:50:07Z');

print(Intl().locale.toString());

print(Intl().dateTimeFormat().d().format(DateTime.now()));

final withTimeZoneLong = Intl(locale: Locale.parse('en'))
.dateTimeFormat()
.ymdt(dateStyle: DateFormatStyle.full, timeStyle: TimeFormatStyle.short)
.withTimeZoneLong();
print(withTimeZoneLong.format(dateTime, timeZone));
}
13 changes: 6 additions & 7 deletions pkgs/intl4x/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: example_web
description: An example on how to use the intl4x package.
version: 1.0.0
publish_to: none
name: example
description: A sample application using intl4x.

environment:
sdk: '>=3.0.0 <4.0.0'
sdk: ^3.8.0

publish_to: none

dependencies:
intl4x:
intl4x:
path: ../
js: ^0.7.1

dev_dependencies:
dart_flutter_team_lints: ^3.0.0
19 changes: 0 additions & 19 deletions pkgs/intl4x/example/web/index.html

This file was deleted.

22 changes: 0 additions & 22 deletions pkgs/intl4x/example/web/main.dart

This file was deleted.

14 changes: 0 additions & 14 deletions pkgs/intl4x/example/web/styles.css

This file was deleted.

4 changes: 0 additions & 4 deletions pkgs/intl4x/example_native/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/intl4x/example_native/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions pkgs/intl4x/example_native/analysis_options.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions pkgs/intl4x/example_native/bin/example_native.dart

This file was deleted.

15 changes: 0 additions & 15 deletions pkgs/intl4x/example_native/pubspec.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions pkgs/intl4x/hook/identifiers.g.dart

This file was deleted.

90 changes: 0 additions & 90 deletions pkgs/intl4x/hook/link.dart

This file was deleted.

5 changes: 3 additions & 2 deletions pkgs/intl4x/lib/datetime_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

export 'src/datetime_format/datetime_format.dart'
show DateTimeFormat, DatetimeFormatExt;
export 'src/datetime_format/datetime_format.dart' show DateTimeFormatBuilder;
export 'src/datetime_format/datetime_format_impl.dart'
show DateTimeFormatter, ZonedDateTimeFormatter;
export 'src/datetime_format/datetime_format_options.dart';
export 'src/options.dart';
Loading
Loading