Giter Site home page Giter Site logo

Comments (4)

jamesvidler avatar jamesvidler commented on September 6, 2024 1

Hi @ShamiqTheDev, you are on the right track, but the localTime.date is only the date. You'll want to use timeAfter/timeBefore/timeBetween to work with time.

from ui-extensions.

k3rni avatar k3rni commented on September 6, 2024 1

@ShamiqTheDev These operations refer to time as in the shop's timezone. The documentation for localTime says

localTime (LocalTime!)
Information about the current time relative to the shop's timezone setting.

The highlighted line in your query above will return true if, at the time of running the customization function, the local time in UAE is between midnight and 16:00.

from ui-extensions.

ShamiqTheDev avatar ShamiqTheDev commented on September 6, 2024

Hi @jamesvidler,

I am using
uaeShippingToday :timeBetween(startTime: "00:00:00", endTime: "15:59:59"),
can you please confirm the time zone it uses? the store is in UAE timezone.

Also, can you confirm if I am using it the right way, like startTime 12 am and endTime 4 pm UAE time?

image

from ui-extensions.

ShamiqTheDev avatar ShamiqTheDev commented on September 6, 2024

@k3rni Thank you so much for the clarification. I am developing the extension on my development store where the timezone was not set properly, hence confused me, I discovered I must set the store's local time zone from shop settings, after which my doubt was cleared out and I was able to write my logic properly.

Thanks everyone for the support here.

from ui-extensions.

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.