isValidExpDate
- Method
SlimCD.Validate.isValidExpDate(valid_month, valid_year)
Purpose
Checks the month and year to be greater than or equal to the current month and year
Description
xxx.
Business Rules
Argument List
Name Required Usage isValidExpDateRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
isValidExpDate Argument List
Name Required Usage isValidExpDateRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
isValidExpDate Request Fields
Month numeral, 1-12 required n/a descr Year numeral, YY or YYYY required n/a descr footnote.
Reply Fields
reply outer tag for the reply data block response Success, FAIL, Error Reply Hierarchy
- one
- 1
- 2
- 3
- 4
Remarks
xxx.
- one
- Include
012<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script>
Method
012function Validate.isValidExpDate (month,year)request
012month, yearReply
012True or FalseSample Code
123456789101112{var valid_month = '12';var valid_year = new Date().getFullYear();if (SlimCD.Validate.isValidExpDate(valid_month, valid_year) === true) {alert('valid expiration date');}else {alert('invalid expiration date');}}Downloads
- Method
012code
request
012codeReply
012codeSample Code
12345678$SlimCD =new SlimCD() ;//(takes 2 digit year or 4 digit year)if ($SlimCD->Validate_isValidExpDate('12','19') )echo 'Valid Expiration Date';elseecho 'Not a Valid Expiration Date';Downloads
- Include
012using SlimCD;
Method
012public bool isValidExpDate(int month, int year);Request
012345678public class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
0123456789public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
12345678910111213using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "R6UT8C6M";reply = CloseBatch(request, 600);if (reply.response=="Success"){...} else {MessageBox.show (reply.description);}Downloads
- Method
012public async Task CloseBatch(CloseBatchRequest request, int timeout = 600)
Request
012345678ppublic class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
0123456789public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
123456789using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "1032";request.password = "289075";request.siteid = 0;reply = await CloseBatch(request, 600);Downloads
- Include
012#import "SlimCD.h"
Method
1- (BOOL) validateIsValidExpDate:(NSUInteger)month year:(NSUInteger)year;Reply
012YES or NOSample Code
1234567891011SlimCD *api = [[SlimCD alloc] init];if ([api validateIsValidExpDate:12 year:2015]){NSLog(@"Expiration date is valid.");}else{NSLog(@"Expiration date is NOT valid.");} - Method
012code
request
012codeReply
012codeSample Code
123codeDownloads