0

This is a small piece of a larger script which in PowerShell returns the current date of a specified region, in that language. According to my own use it's in the format: "22 December 2022"

Example of a PowerShell script which uses get-time and CultureInfo to return the date in Albanian is:

#   Print todays date with full month in Albanian
$today = get-date -format "dd MM yyyy"
$day = get-date -Date "$today"
$culture = [CultureInfo]'sq-al'
$day.ToString('%d MMMM yyyy', $culture)
$albanian = "$($day.ToString('%d MMMM yyyy', $culture))"

This would return

22 dhjetor 2022

I am interested in finding out if this is possible using just bash?

Patrik G
  • 1
  • 1
  • 1
    The `date` command has various format specifiers. Which ones exactly are available is platform-dependent, but getting a localized month name should be pretty universal, as long as you have the required locale installed and activated. – tripleee Dec 22 '22 at 17:29

0 Answers0