Sponsored Content
Full Discussion: General Purpose Date Script
Top Forums UNIX for Beginners Questions & Answers General Purpose Date Script Post 302972456 by drl on Thursday 5th of May 2016 02:00:23 PM
Old 05-05-2016
Hi.
Quote:
Originally Posted by Corona688
I'm not certain whether I want to depend on outside locale or even the Perl locale module; this script sees the most use as a kludge on old systems ...
I think Corona688 and I have had a discussion about perl modules -- I tend to prefer to use them to make code shorter, and I think Corona688 likes his code to be as independent as possible.

I usually recommend this perl date code when the user (typically on older Solaris or AIX) cannot use GNU date or the dateuitls suite, so I definitely agree with Corona688's position in such situations.

Thanks again to Corona688 for taking the time to provide this.

Best wishes ... cheers, drl
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Looking for a general purpose System Monitor

Does anyone have any scripts or suggestions on a general purpose Unix/Linux monitoring tool? (5 Replies)
Discussion started by: darthur
5 Replies

2. UNIX for Dummies Questions & Answers

whats the purpose of the following script?

whats the purpose of the following script? who could run it? To what is the script refering that exceeds 75%? The mailbox? What does sed 's/%//' do? (1 Reply)
Discussion started by: vrn
1 Replies

3. Shell Programming and Scripting

General Q: how to run/schedule a php script from cron jobs maybe via bash from shell?

Status quo is, within a web application, which is coded completely in php (not by me, I dont know php), I have to fill out several fields, and execute it manually by clicking the "go" button in my browser, several times a day. Thats because: The script itself pulls data (textfiles) from a... (3 Replies)
Discussion started by: lowmaster
3 Replies

4. Shell Programming and Scripting

awk (?) help or just general script

I have two files (___ represents blanks) Foo1 1000 345 456 1001 876 908 1002 ___ 786 1003 643 908 1004 345 234 and Foo2 1000 345 1001 876 1002 111 1003 643 1004 345 (3 Replies)
Discussion started by: garethsays
3 Replies

5. Shell Programming and Scripting

script to fill up disk space for testing purpose

Hello everyone I am new to this forum I am working on a project and needed a test script to fill up a disk partition /tmp/data to see how the program fails. The system I am working on is a redhat 5.3. Is there anything out there? Thanks. (10 Replies)
Discussion started by: dp100022
10 Replies

6. UNIX for Dummies Questions & Answers

Purpose of - (hypen) in script or command line

Hi, I am new for unix and I am following ABS guide. What is the purpose of - (hypen ) in the below command and What it will do in this?. Can anyone explain it in detail. Rest of the things in the below command I understood somewhat. (cd /source/directory && tar cf - . ) | (cd /dest/directory &&... (1 Reply)
Discussion started by: gwgreen1
1 Replies

7. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

8. UNIX for Beginners Questions & Answers

General Purpose XML Processing

I've been kicking this around for a while now, I might as well post it here. v0.0.9, now properly supporting self-closing tags. v0.0.8, an important quoting fix and a minor change which should handle special <? <!-- etc. tags without seizing up as often. Otherwise the code hasn't changed much.... (6 Replies)
Discussion started by: Corona688
6 Replies
DateTime::Locale::Base(3)				User Contributed Perl Documentation				 DateTime::Locale::Base(3)

NAME
DateTime::Locale::Base - Base class for individual locale objects SYNOPSIS
use base 'DateTime::Locale::Base'; DEFAULT FORMATS
Each locale has a set of four default date and time formats. They are distinguished by length, and are called "full", "long", "medium", and "short". Each locale may have a different default length which it uses when its "$locale->date_format_default()", "$locale->time_format_default()", or "$locale->datetime_format_default()" methods are called. This can be changed by calling the "$locale->set_default_date_format()" or "$locale->set_default_time_format()" methods. These methods accept a string which must be one of "full", "long", "medium", or "short". NAME FORMS
Most names come in a number of variations. First, they may vary based on length, with wide, abbreviated, and narrow forms. The wide form is typically the full name, while the narrow form is often a single character. The narrow forms may not be unique. For example, "T" may be used for Tuesday and Thursday in the English narrow forms. Many names also distinguish between "format" and "stand-alone" forms of a pattern. The format pattern is used when the thing in question is being placed into a larger string. The stand-alone form is used when displaying that item by itself, for example in a calendar. METHODS
All locales provide the following methods: o $locale->id() The locale's id. o $locale->language_id() The language portion of the id. o $locale->script_id() The script portion of the id, if any. o $locale->territory_id() The territory portion of the id, if any. o $locale->variant_id() The variant portion of the id, if any. o $locale->name() The full name for the locale in English. o $locale->language() The language name for the locale in English. o $locale->script() The script name for the locale in English, if any. o $locale->territory() The territory name for the locale in English, if any. o $locale->variant() The variant name for the locale in English, if any. o $locale->native_name() The full name for the locale in its native language, if any. o $locale->native_language() The language name for the locale in its native language, if any. o $locale->native_script() The script name for the locale in its native language, if any. o $locale->native_territory() The territory name for the locale in its native language, if any. o $locale->native_variant() The variant name for the locale in its native language, if any. o $locale->month_format_wide() Returns an array reference containing the wide format names of the months, with January as the first month. o $locale->month_format_abbreviated() Returns an array reference containing the abbreviated format names of the months, with January as the first month. o $locale->month_format_narrow() Returns an array reference containing the narrow format names of the months, with January as the first month. o $locale->month_stand_alone_wide() Returns an array reference containing the wide stand-alone names of the months, with January as the first month. o $locale->month_stand_alone_abbreviated() Returns an array reference containing the abbreviated stand-alone names of the months, with January as the first month. o $locale->month_stand_alone_narrow() Returns an array reference containing the narrow stand-alone names of the months, with January as the first month. o $locale->day_format_wide() Returns an array reference containing the wide format names of the days, with Monday as the first day. o $locale->day_format_abbreviated() Returns an array reference containing the abbreviated format names of the days, with Monday as the first day. o $locale->day_format_narrow() Returns an array reference containing the narrow format names of the days, with Monday as the first day. o $locale->day_stand_alone_wide() Returns an array reference containing the wide stand-alone names of the days, with Monday as the first day. o $locale->day_stand_alone_abbreviated() Returns an array reference containing the abbreviated stand-alone names of the days, with Monday as the first day. o $locale->day_stand_alone_narrow() Returns an array reference containing the narrow stand-alone names of the days, with Monday as the first day. o $locale->quarter_format_wide() Returns an array reference containing the wide format names of the quarters. o $locale->quarter_format_abbreviated() Returns an array reference containing the abbreviated format names of the quarters. o $locale->quarter_format_narrow() Returns an array reference containing the narrow format names of the quarters. o $locale->quarter_stand_alone_wide() Returns an array reference containing the wide stand-alone names of the quarters. o $locale->quarter_stand_alone_abbreviated() Returns an array reference containing the abbreviated stand-alone names of the quarters. o $locale->quarter_stand_alone_narrow() Returns an array reference containing the narrow stand-alone names of the quarters. o $locale->era_wide() Returns an array reference containing the wide names of the eras, with "BCE" first. o $locale->era_abbreviated() Returns an array reference containing the abbreviated names of the eras, with "BCE" first. o $locale->era_narrow() Returns an array reference containing the abbreviated names of the eras, with "BCE" first. However, most locales do not differ between the narrow and abbreviated length of the era. o $locale->am_pm_abbreviated() Returns an array reference containing the abbreviated names of "AM" and "PM". o $locale->date_format_long() o $locale->date_format_full() o $locale->date_format_medium() o $locale->date_format_short() Returns the CLDR date pattern of the appropriate length. o $locale->date_formats() Returns a hash reference of CLDR date patterns for the date formats, where the keys are "full", "long", "medium", and "short". o $locale->time_format_long() o $locale->time_format_full() o $locale->time_format_medium() o $locale->time_format_short() Returns the CLDR date pattern of the appropriate length. o $locale->time_formats() Returns a hash reference of CLDR date patterns for the time formats, where the keys are "full", "long", "medium", and "short". o $locale->datetime_format_long() o $locale->datetime_format_full() o $locale->datetime_format_medium() o $locale->datetime_format_short() Returns the CLDR date pattern of the appropriate length. o $locale->datetime_formats() Returns a hash reference of CLDR date patterns for the datetime formats, where the keys are "full", "long", "medium", and "short". o $locale->date_format_default() o $locale->time_format_default() o $locale->datetime_format_default() Returns the default CLDR date pattern. The length of this format is based on the value of "$locale->default_date_format_length()" and/or "$locale->default_time_format_length()". o $locale->default_date_format_length() o $locale->default_time_format_length() Returns the default length for the format, one of "full", "long", "medium", or "short". o $locale->set_default_date_format_length() o $locale->set_default_time_format_length() Sets the default length for the format. This must be one of "full", "long", "medium", or "short". o $locale->prefers_24_hour_time() Returns a boolean indicating the preferred hour format for this locale. o $locale->first_day_of_week() Returns a number from 1 to 7 indicating the local first day of the week, with Monday being 1 and Sunday being 7. For example, for a US locale this returns 7. o $locale->available_formats() A list of format names, like "MMdd" or "yyyyMM". This should be the list directly supported by the subclass, not its parents. o $locale->format_for($key) Given a valid name, returns the CLDR date pattern for that thing, if one exists. SUPPORT
See DateTime::Locale. AUTHORS
Richard Evans <rich@ridas.com> Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2003 Richard Evans. Copyright (c) 2004-2005 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.18.2 2017-10-06 DateTime::Locale::Base(3)
All times are GMT -4. The time now is 06:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy