TextToolsPro icon indicating copy to clipboard operation
TextToolsPro copied to clipboard

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

Open Dtrieb opened this issue 1 year ago • 10 comments

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

P.e.:

Today: 10.8.2024 But I want 10.08.2024

Dtrieb avatar Aug 10 '24 10:08 Dtrieb

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.

lochidev avatar Aug 10 '24 11:08 lochidev

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 avatar Aug 10 '24 12:08 Dtrieb

One question:

Why add format: ddHHmmMMMyy

a dot like this: 101549Aug.24

Dtrieb avatar Aug 10 '24 13:08 Dtrieb

That is also weird. No dot in my end.

lochidev avatar Aug 10 '24 14:08 lochidev

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

lochidev avatar Aug 10 '24 14:08 lochidev

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

That's what I use.

Dtrieb avatar Aug 10 '24 14:08 Dtrieb

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

lochidev avatar Aug 10 '24 14:08 lochidev

Screenshot_20240810-164214

101640Aug.24 that's what I get.

Version 7.0.0 com.dingleinc.texttoolspro

Dtrieb avatar Aug 10 '24 14:08 Dtrieb

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.

lochidev avatar Aug 10 '24 15:08 lochidev

ddHHmm%byy = 101744Aug.2024

Dtrieb avatar Aug 10 '24 15:08 Dtrieb