EDate (date) label: Date addition and subtraction instance (a code line calculates the number of days before 50 days), edate days before
Example:
What was the number 50 days ago?
Calculation (@ {sys: date} = today,-50 minus 50, unit = day is
use the shell in Linux to get yesterday, tomorrow or many days before the date time -- A- , the: -:xxblogjava-Expert Area Original http://www.blogjava.net/xzclog/archive/2015/12/08/428555.htmlTheme Shell Original address:
First, how does Perl get
Copy Code code as follows:
#!/usr/bin/perl-w
Use POSIX QW (strftime);
My $day = strftime ("%y%m%d", LocalTime (time-24*3600)); #获取昨天的日期
Second, in Linux on the man date-d parameters of the
The order is over $600 during the calculation activity and has not been placed for more than 30 days before the activity datefirst get this demand, first need to clear the activity date interval 10.29-10.31, its secondary to the time of the day of
"Scenario One" deletes a file before the specified number of days in the specified path (whichever is the last modified date of the file): BAT + REG + VBS
Copy Code code as follows:
@echo off
:: Demo: Deletes a file that precedes a
"Scheme one" BAT + REG + VBS
Copy Code code as follows:
@echo off
:: Demo: Deletes a folder that precedes the specified number of days in the specified path, whichever is the last modified date of the folder.
:: If the demo results
Local Test Cases:
# there can be no spaces on either side of the equal sign, before the error has been out here
yesterday= ' date-d last-day +%y-%m-%d '
echo $yesterday
curday= ' Date +%y-%m-%d '
echo $curday
echo "Now time: ' Date ' +%y%m%d%T '"
From: Java translation station
Links: http://it.deepinmind.com/java/2015/03/17/20-examples-of-date-and-time-api-from-Java8.html
In addition to lambda expressions, stream, and a few minor improvements, Java 8 introduces a new set of
Java Date, the day of the year, the abbreviation of the week, the number of days of the month, the number of months of the year, javadate
Import java. util. *; public class DateDemo {public static void main (String args []) {Date date = new Date ();
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.