lochidev / Expandroid

Text expander for android - with espanso config import/export
Other
140 stars 6 forks source link

Months (MMM) with dot - HELP NEEDED FROM THE COMMUNITY (edited by lochidev) #27

Open Dtrieb opened 2 months ago

Dtrieb commented 2 months ago

If I add a date per template it miss a zero.

P.e.:

Today: 10.8.2024 But I want 10.08.2024

lochidev commented 2 months ago

Hi! What is your app version? By template do you mean the in app template buttons?

I've tested in the in app templates and https://github.com/lochidev/TextToolsPro/blob/main/examples/config.yml and in both instances I get "10/08/2024". If you can share your config we could find out the error.

Dtrieb commented 2 months ago

Ah!

I found my error, my variable {mydate} was set to: format: dd.M.yyyy there I miss a M I've had to write format: dd.MM.yyyy

Sorry!

Dtrieb commented 2 months ago

One question:

Why add format: ddHHmmMMMyy

a dot like this: 101549Aug.24

lochidev commented 2 months ago

That is also weird. No dot in my end.

lochidev commented 2 months ago

You can also mess around by changing the string in this ToString() method here: https://dotnetfiddle.net/yA5DFt

That is what is happening under the hood in this app.

Docs: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

Dtrieb commented 2 months ago
- trigger: :drkdatum
  replace: '{{mydate}}'
  vars:
  - name: mydate
    type: date
    params:
      echo: 
      format: ddHHmmMMMyy
      offset: 0
      cmd: 
      choices: 
  word: false

That's what I use.

lochidev commented 2 months ago

I tried your config and I got something like:"101549Aug24" That is what you need right? Can you try using v7.0.0? https://github.com/lochidev/Expandroid/releases/tag/v7.0.0

Dtrieb commented 2 months ago

Screenshot_20240810-164214

101640Aug.24 that's what I get.

Version 7.0.0 com.dingleinc.texttoolspro

lochidev commented 2 months ago

Can you try with "ddHHmm%byy"? instead?

Unfortunately since I can't replicate this on my end this will be a hard fix. Let's open the issue and see if anyone also will get this issue.

Dtrieb commented 2 months ago

ddHHmm%byy = 101744Aug.2024