GithubHelp home page GithubHelp logo

Comments (5)

nicorac avatar nicorac commented on May 19, 2024

Dates are formatted using the standard Intl.* function available in JS (BCR-GUI is an Ionic WebApp).

The culture to be used for days/months names is the one set in Android "Language" settings.

PS: I'm working on an improvement in datetime formatting management.
I could also include an option to "force" a custom culture instead of the one set in Android...

from bcr-gui.

rezad1393 avatar rezad1393 commented on May 19, 2024

dont get me wrong I love this feature and adding an option to set it per app would be icing on cake.

I was asking as a noob how this is done, and you say dates are used as Intl.* which to my untrained ears seems to mean that they are saved as universal (like unix time) and then interpreted according to language?

but the app bcr itself uses json (basically JS text) and you use that right?

from bcr-gui.

nicorac avatar nicorac commented on May 19, 2024

Dates are timestamps, the number of seconds (or milliseconds, depending on required precision) elapsed from 1 Jan 1970, aka Unix Epoch time.
This is pretty common in the programming world to avoid issues with timezones, leap years, time interval calculations and so on...

from bcr-gui.

rezad1393 avatar rezad1393 commented on May 19, 2024

I understand that.

it is just as an Iranian I have never saw an app uses jalali calendar automatically (or even with user setting) in android and I thought that maybe (as I heard about in android 14 adding more locale stuff) maybe I have missed something in android itself, but it seems that as you say it is not android and it it is your app that does the converting.

sigh.

it may have been unintentional right?
you used webapp and the webapp framework ( is that the right word?) just convert date to set language?

whatever it is , thank you I quite like it.

from bcr-gui.

nicorac avatar nicorac commented on May 19, 2024

Intl.* functions for a WebApp are provided by the OS WebView component; on Android it is some kind related to Chrome App.

whatever it is , thank you I quite like it.

👍

from bcr-gui.

Related Issues (20)

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.