6 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a question related to makefile. I'm new to makefile and I'm in the process of writing a makefile for my RBT build. I have multiple source files and when I compile them I will get multiple object files (one object file for each source file). I'm having problem in creating a target for... (1 Reply)
Discussion started by: Anand Venkatesa
1 Replies
2. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies
3. UNIX for Advanced & Expert Users
Hi!
I've got a build process where scripts create multiple targets from their sources. But here I'm running into a conceptual problem of GNU make: If one has multiple targets in a dependency, make applies the rules once for every target that is out of sync - which is correct for normal... (3 Replies)
Discussion started by: treczoks
3 Replies
4. UNIX for Advanced & Expert Users
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies
5. Solaris
Hi all
Ive been given the task to write a script that tests that certain link files work, i.e. the physical directory the link points too, is actually there.
Now, before I go down the route of ls -l | awk ...... or using test or find, is there a far more simpler command that I can use ?
... (2 Replies)
Discussion started by: sbk1972
2 Replies
6. UNIX for Dummies Questions & Answers
**DUP post in Shell Programming and Scripting ***
Hello,
I'm still learning the ins and outs of how to combine multiple Unix commands together (specifically AIX), but I'm looking to do the following (only on local files):
1. Find all symbolic links that are not set up using absolute... (3 Replies)
Discussion started by: bdizenhouse
3 Replies
LEARN ABOUT PHP
datefmt_set_lenient
DATEFMT_SET_LENIENT(3) 1 DATEFMT_SET_LENIENT(3)
IntlDateFormatter::setLenient - Set the leniency of the parser
Object oriented style
SYNOPSIS
public bool IntlDateFormatter::setLenient (bool $lenient)
DESCRIPTION
Procedural style
bool datefmt_set_lenient (IntlDateFormatter $fmt, bool $lenient)
Define if the parser is strict or lenient in interpreting inputs that do not match the pattern exactly. Enabling lenient parsing allows
the parser to accept otherwise flawed date or time patterns, parsing as much as possible to obtain a value. Extra space, unrecognized
tokens, or invalid values ("February 30th") are not accepted.
PARAMETERS
o $fmt
- The formatter resource
o $lenient
- Sets whether the parser is lenient or not, default is TRUE (lenient).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
datefmt_set_lenient(3) example
<?php
$fmt = datefmt_create(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN,
'dd/MM/yyyy'
);
echo 'lenient of the formatter is : ';
if ($fmt->isLenient()) {
echo 'TRUE';
} else {
echo 'FALSE';
}
datefmt_parse($fmt, '35/13/1971');
echo "
Trying to do parse('35/13/1971').
Result is : " . datefmt_parse($fmt, '35/13/1971');
if (intl_get_error_code() != 0) {
echo "
Error_msg is : " . intl_get_error_message();
echo "
Error_code is : " . intl_get_error_code();
}
datefmt_set_lenient($fmt, false);
echo "
Now lenient of the formatter is : ";
if ($fmt->isLenient()) {
echo 'TRUE';
} else {
echo 'FALSE';
}
datefmt_parse($fmt, '35/13/1971');
echo "
Trying to do parse('35/13/1971').
Result is : " . datefmt_parse($fmt, '35/13/1971');
if (intl_get_error_code() != 0) {
echo "
Error_msg is : ".intl_get_error_message();
echo "
Error_code is : ".intl_get_error_code();
}
?>
Example #2
OO example
<?php
$fmt = new IntlDateFormatter(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN,
'dd/MM/yyyy'
);
echo 'lenient of the formatter is : ';
if ($fmt->isLenient()) {
echo 'TRUE';
} else {
echo 'FALSE';
}
$fmt->parse('35/13/1971');
echo "
Trying to do parse('35/13/1971').
Result is : " . $fmt->parse('35/13/1971');
if (intl_get_error_code() != 0) {
echo "
Error_msg is : " . intl_get_error_message();
echo "
Error_code is : " . intl_get_error_code();
}
$fmt->setLenient(FALSE);
echo "
Now lenient of the formatter is : ";
if ($fmt->isLenient()) {
echo 'TRUE';
} else {
echo 'FALSE';
}
$fmt->parse('35/13/1971');
echo "
Trying to do parse('35/13/1971').
Result is : " . $fmt->parse('35/13/1971');
if (intl_get_error_code() != 0) {
echo "
Error_msg is : " . intl_get_error_message();
echo "
Error_code is : " . intl_get_error_code();
}
?>
The above example will output:
lenient of the formatter is : TRUE
Trying to do parse('35/13/1971').
Result is : 66038400
Now lenient of the formatter is : FALSE
Trying to do parse('35/13/1971').
Result is :
Error_msg is : Date parsing failed: U_PARSE_ERROR
Error_code is : 9
SEE ALSO
datefmt_is_lenient(3), datefmt_create(3).
PHP Documentation Group DATEFMT_SET_LENIENT(3)