LifeMate — Personal, Family & Learning Companion
docs/offline-data-rescue-options
chore/phase1-repository-cleanup
deploy/stable-web-apk
deployment-static
design/mobile-accessibility-v2
design/mobile-navigation-review
docs/child-education-access-decision
docs/offline-data-rescue-options
docs/owner-guide-and-delivery-plan
docs/phase1-policy-options
docs/public-review-live-2026-10-15
feat/aparat-learning-library
feat/child-device-safety
feat/child-identity-schema
feat/flutter-mobile-navigation
feat/learning-content-operations
feat/local-signing-preflight
feat/online-family-stage0
feat/personal-encrypted-recovery
feat/private-planner-series-api
feat/public-review-page
feat/standalone-weekly-planner
feat/weekly-planner-android
final-feature-1/iran-family-school
fix/auth-abuse-expiry-safety
fix/auth-expiry-after-lock
fix/backend-request-safety
fix/lifeguide-bootstrap-naming-ci
fix/lifeguide-pages-qa-base-preflight
fix/lifeguide-qa-pages-env-deployment
fix/local-task-persistence
fix/managed-child-session-boundary
fix/personal-jalali-dates
fix/personal-notification-controls
fix/personal-upgrade-delivery-guard
fix/sms-approval-gates
fix/study-duration-display
infra/cloudflare-neon-migration
infra/lifeguide-cloudflare-qa
infra/lifeguide-github-pages-qa
infra/lifeguide-supabase-qa
main
phase-1/foundation-completion
phase-2/product-foundation-identity
phase-3/planner-school-family-core
phase-4/ai-learning-wellbeing
phase-5/hardening-observability-release
test/android-reminder-acceptance
test/personal-notification-settings
test/personal-recovery-acceptance
test/role-entry-apk
| 1 | import 'package:flutter_test/flutter_test.dart'; |
| 2 | import 'package:lifemate/standalone/personal_dates.dart'; |
| 3 | |
| 4 | void main() { |
| 5 | final references = <DateTime, String>{ |
| 6 | DateTime(2024, 3, 20): '۱ فروردین ۱۴۰۳ شمسی', |
| 7 | DateTime(2025, 3, 20): '۳۰ اسفند ۱۴۰۳ شمسی', |
| 8 | DateTime(2025, 3, 21): '۱ فروردین ۱۴۰۴ شمسی', |
| 9 | DateTime(2026, 10, 20): '۲۸ مهر ۱۴۰۵ شمسی', |
| 10 | DateTime(2027, 3, 21): '۱ فروردین ۱۴۰۶ شمسی', |
| 11 | }; |
| 12 | for (final entry in references.entries) { |
| 13 | test('Persian date for ${entry.key.toIso8601String()}', () { |
| 14 | expect(personalDateLabel(entry.key), entry.value); |
| 15 | }); |
| 16 | } |
| 17 | test('week chip day follows Persian month and does not use Gregorian day', |
| 18 | () { |
| 19 | expect(personalDayLabel(DateTime(2025, 3, 20)), '۳۰'); |
| 20 | expect(personalDayLabel(DateTime(2025, 3, 21)), '۱'); |
| 21 | }); |
| 22 | test('display uses the supplied calendar fields without moving UTC midnight', |
| 23 | () { |
| 24 | expect(personalDateLabel(DateTime.utc(2027, 3, 21)), '۱ فروردین ۱۴۰۶ شمسی'); |
| 25 | }); |
| 26 | } |